Yii Framework Forum: PHP7.2 - Illegal string offset 'type' - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

PHP7.2 - Illegal string offset 'type' Rate Topic: -----

#1 User is offline   clonex1 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 09-December 16

Posted 17 February 2018 - 05:25 AM

Hi,

I just switched to PHP7.2 on Yii2.0.13, and the broken down into PHP Warning – yii\base\ErrorException

Illegal string offset 'type' line 559, in file vendor\yiisoft\yii2\helpers\BaseHtml.php

Any idea on how to fix this?


Thanks,
0

#2 User is online   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,639
  • Joined: 16-February 11
  • Location:Japan

Posted 17 February 2018 - 10:58 PM

View Postclonex1, on 17 February 2018 - 05:25 AM, said:

Illegal string offset 'type' line 559, in file vendor\yiisoft\yii2\helpers\BaseHtml.php

The line 559 of BaseHtml.php is in the "input()" method.

Quote

556    public static function input($type, $name = null, $value = null, $options = [])
557    {
558        if (!isset($options['type'])) {
559            $options['type'] = $type;
560        }
...


These lines remain unchanged since Qiang Xue edited them 3 years ago.
Please see the source code history at github(https://github.com/y...rs/BaseHtml.php)

It seems like the caller of the method might be setting the $options parameter to something other than an array.
Could you post the detailed call stack information?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users