PHP server upgrade and webpage doesn't work – functions.php error
-
My host upgrade PHP version from 5.3 to the PHP 5.3.23 adn now I get this error:
Fatal error: Invalid opcode 153/1/8. in /public_html/wp-content/themes/my_theme/functions.php on line 520Function.php file has this:
add_filter(‘wp_nav_menu_objects’, function ($items) {
$hasSub = function ($menu_item_id, &$items) {
foreach ($items as $item) {
if ($item->menu_item_parent && $ite->menu_item_parent==$menu_item_id) {
return true;
}
}
return false;
};foreach ($items as &$item) {
if ($hasSub($item->ID, &$items)) {
$item->classes[] = ‘dropdown’; // all elements of field “classes” of a menu item get join together and render to class attribute of- element in HTML
$item->attr_title=$item->title;
$item->attr_class =’dropdown-toggle’;
$item->attr_data_toggle=’dropdown’;
//break;
}
}
return $items;
});
I don’t know what to do and what is wrong, because with version 5.3 everything was working. I use tle last WP version.
- element in HTML
The topic ‘PHP server upgrade and webpage doesn't work – functions.php error’ is closed to new replies.