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
it tries to access $relation->via->from[0]. However, this does not exist. Via is an array with keys 0, 1, 2 as shown below. The following error is thrown when generating the CRUD:
PHP Warning 'yii\base\ErrorException' with message 'Attempt to read property "from" on array'
$relation->via looks like this:
It seems like this happens only with many-to-many relations when using via(). (JUNCTION_RELATION_VIA_MODEL)
Changing $relation->via->from[0] to $relation->via->from[0] ?? $relation->via[0] seems to fix it, but I'm not sure if this is correct.
Giiant 0.15.0-beta2
Yii2 2.0.49.2
The text was updated successfully, but these errors were encountered:
In the following line
yii2-giiant/src/generators/crud/default/views/view.php
Line 161 in 0b063fd
it tries to access $relation->via->from[0]. However, this does not exist. Via is an array with keys 0, 1, 2 as shown below. The following error is thrown when generating the CRUD:
PHP Warning 'yii\base\ErrorException' with message 'Attempt to read property "from" on array'
$relation->via looks like this:
It seems like this happens only with many-to-many relations when using via(). (JUNCTION_RELATION_VIA_MODEL)
Changing $relation->via->from[0] to $relation->via->from[0] ?? $relation->via[0] seems to fix it, but I'm not sure if this is correct.
Giiant 0.15.0-beta2
Yii2 2.0.49.2
The text was updated successfully, but these errors were encountered: