3

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

e-israel
  • 623
  • 10
  • 30
  • 2
    Please report to https://github.com/yiisoft/yii/issues mentioning that it is a regression. – Sam Dark Feb 05 '19 at 10:09
  • There is already an issue, but yii1 just get php incompatibility and security fixes https://github.com/yiisoft/yii/issues/4226 – Honsa Stunna Apr 30 '19 at 15:21

1 Answers1

1

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.

Honsa Stunna
  • 577
  • 2
  • 8
  • 24
  • 1
    Thanks, l.196 and l.209 work for me (Yii 1.1.21). Like you said, it is not recommended. – m50 Nov 30 '22 at 11:26