Illegal string offset error
-
Hi everyone
I’m having a problem with a theme I’m using, I get the following error: Warning: Illegal string offset ‘param_name’ in (shows location) on line 75
Warning: Illegal string offset ‘param_name’ in (shows location) on line 77
It repeats these two errors 6 times each. Now the code found on lines 75 and 77 are the following:72)if(!empty($attributes[‘params’])) {
73) $attributes_keys = Array();
74) foreach($attributes[‘params’] as $attribute) {
75) $key = array_search($attribute[‘param_name’], $attributes_keys);
76) if( $key === false ) {
77) $attributes_keys[] = $attribute[‘param_name’];
78) self::$sc[$name][‘params’][] = $attribute;
79) } else {
80) self::$sc[$name][‘params’][$key] = $attribute;The information I’ve found so far suggests that PHP 5.4 is more strict with array operations, hence the error message.
Now my question is, how must the code be altered to make it work without errors?
The topic ‘Illegal string offset error’ is closed to new replies.