0

after upgrading to PHP 5.6 I am getting different "illegal string offset" warnings:

Warning: Illegal string offset 'id' in header.php on line 4

foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}

Anybody any idea how to fix this issue?

Thank you in advance!!

w-f
  • 3
  • 3
  • Probably different error settings in your newly php.ini file. Adding `error_reporting(0);` in the beginning of any php file will disable showing all errors for that particular file. But the warning was probably there before the upgrade, only not shown. – Kurt Van den Branden Jan 07 '17 at 11:12
  • It could be an illegal offset warning because of a datatype mismatch. Have a look at this answer: http://stackoverflow.com/a/37118210/4746087. – Kurt Van den Branden Jan 07 '17 at 11:21
  • @KurtVandenBranden i think so too... so far I deactivated the warning output with "ini_set('display_errors','off');" in wp-config.php. "Fixed" the issue! – w-f Jan 07 '17 at 11:30

0 Answers0