Voyager: [BUG] Illegal string offset 'locale'

Created on 7 Feb 2019  路  9Comments  路  Source: the-control-group/voyager

Version information

Description


After updating a user, error occurs

Illegal string offset 'locale'

in vendor\tcg\voyager\src\Models\User.php

Screenshots

screenshot_15

possible bug

Most helpful comment

You need add settings column to casts
protected $casts = [ 'email_verified_at' => 'datetime', 'settings' => 'json' ];

It's worked on me

All 9 comments

Please show us your user-model (app/User.php).
Maybe you are using casts in it which would override our casts.

07.02.2019, 22:22, "Christoph Schweppe" notifications@github.com:Please show us your user-model (app/User.php).
Maybe you are using casts in it which would override our casts.

鈥擸ou are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

screenshot_25

In my case, you only need to remove the protected $casts = ... section of the code and it worked just like @emptynick suggested :)

You need add settings column to casts
protected $casts = [ 'email_verified_at' => 'datetime', 'settings' => 'json' ];

It's worked on me

@NHNajibullah pretty simple solution,thanks.

Looks like you guys figured it out. Closing.

This was taken care of in #3909 especially commit https://github.com/the-control-group/voyager/pull/3909/commits/56e72e668a7c124f69172dbac1f12ba3bdad7272
Be aware that this will force you to remove the settings-cast again when upgrading to 1.2

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TXRRNT picture TXRRNT  路  3Comments

ferrywae picture ferrywae  路  4Comments

wp-src picture wp-src  路  3Comments

vaggelis2018 picture vaggelis2018  路  3Comments

TPRAsh picture TPRAsh  路  3Comments