reset() expects parameter 1 to be array, integer given in Gii after update Yii version

983 views Asked by At

After updating Yii to 1.1.20 I get the error reset() expects parameter 1 to be array, integer given when clicking the diff option in Model generator.

I found the function in https://github.com/yiisoft/yii/blob/master/framework/gii/components/Pear/Text/Diff/Engine/native.php#L194 and https://github.com/yiisoft/yii/blob/master/framework/gii/components/Pear/Text/Diff/Engine/native.php#L206

So i cannot find the solution.

enter image description here

1

There are 1 answers

1
Honsa Stunna On BEST ANSWER

You can work around this problem change the framework file (not recommended)

framework/gii/components/Pear/Text/Diff/Engine/native.php

On line 194 and 206 check if $match is an array and skip the code part which depends on that.