schmunk42 / yii2-giiant

Yii 2 Framework Code Generator Gii on Steroids
271 stars 120 forks source link

type errors #293

Open yiqing-95 opened 1 year ago

yiqing-95 commented 1 year ago

` TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /Volumes/macintosh-hd/workspace/php_space/vendor/schmunk42/yii2-giiant/src/helpers/SaveForm.php:60 Stack trace:

0 /Volumes/macintosh-hd/workspace/php_space/YiiSpace/vendor/schmunk42/yii2-giiant/src/helpers/SaveForm.php(60): method_exists(Array, 'getBasePath')

` seems call method on an array ! after minor modify ,it is ok.

` foreach (\Yii::$app->modules as $moduleId => $module) { /*

schmunk42 commented 1 year ago

Which PHP Version are you running?

yiqing95 commented 1 year ago

php8.2

handcode commented 1 year ago

Isn't this already fixed in d64e07b4e31c83a6774a6ee3b58df835ffaacdf0 ?

ajpgtech commented 10 months ago

php8.2

8,1 for me - same issue - same line Using @dev version PHP 8.1 Yii 2.0.45

Live edit of the above mentioned commit worked.