Title: PHP server upgrade and webpage doesn&#039;t work &#8211; functions.php error
Last modified: August 20, 2016

---

# PHP server upgrade and webpage doesn't work – functions.php error

 *  Resolved [bob3s](https://wordpress.org/support/users/bob3s/)
 * (@bob3s)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-server-upgrade-and-webpage-doesnt-work-functionsphp-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 520
 * Function.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.

Viewing 1 replies (of 1 total)

 *  Thread Starter [bob3s](https://wordpress.org/support/users/bob3s/)
 * (@bob3s)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-server-upgrade-and-webpage-doesnt-work-functionsphp-error/#post-3624567)
 * I resolved the problem. My host use eaccelerator which doesn’t support anonymous
   function. So I did:
 * function MY_NAME($items) {
    code of this function }
 * add_filter(‘wp_nav_menu_objects’, ‘MY_NAME’);
 * Everything is working now!

Viewing 1 replies (of 1 total)

The topic ‘PHP server upgrade and webpage doesn't work – functions.php error’ is
closed to new replies.

## Tags

 * [function.php](https://wordpress.org/support/topic-tag/function-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [bob3s](https://wordpress.org/support/users/bob3s/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/php-server-upgrade-and-webpage-doesnt-work-functionsphp-error/#post-3624567)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
