You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon saving an active record, I get a yii\base\ErrorException of Array to string conversion
Stack trace
in /var/www/html/leadworks/protected/vendor/sammaye/yii2-audittrail/LoggableBehavior.php line 101
foreach ($oldattributes as $f => $v) {
if (array_search($f, $ignoredFields) !== false)
unset($oldattributes[$f]);
}
}
// If no difference then WHY?
// There is some kind of problem here that means "0" and 1 do not diff for array_diff so beware: stackoverflow.com/questions/12004231/php-array-diff-weirdness :S
if (count(array_diff_assoc($newattributes, $oldattributes)) <= 0)
return;
// If this is a new record lets add a CREATE notification
if ($insert) {
$this->leaveTrail(self::ACTION_CREATE);
}
// Now lets actually write the attributes
$this->auditAttributes($insert, $newattributes, $oldattributes);
In Yii2, JSON fields are converted to arrays:
This needs to be accounted for in some way.
The text was updated successfully, but these errors were encountered:
Upon saving an active record, I get a
yii\base\ErrorException
ofArray to string conversion
Stack trace
in /var/www/html/leadworks/protected/vendor/sammaye/yii2-audittrail/LoggableBehavior.php line 101
In Yii2, JSON fields are converted to arrays:
This needs to be accounted for in some way.
The text was updated successfully, but these errors were encountered: