Jump to content

[SOLVED] what is up with this?


lordzardeck

Recommended Posts

I cannot figure out why it has a problem with the next to last curly brace. It says its unexpected. Anyone got any Ideas?

 

function add_menu() {
            
          $menu = array();
          
          foreach(find_Plugins() as $plugin) {
              
            if($plugin->hasMethod('get_menu')) {
                
                $reflectionMethod = $plugin->getMethod('get_menu');
                
                if($reflectionMethod->isStatic()) {
                    
                    $items = $reflectionMethod->invoke(null);
                    
                } else {
                
                    //If the method isn't static we need an instance
                    $pluginInstance = $plugin->newInstance();
                    $items = $reflectionMethod->invoke($pluginInstance);
                    
                }
            
            $menu = array_merge($menu, $items);
            
            }
    
    `  `  }         
        
          return $menu;
        
      }

Link to comment
https://forums.phpfreaks.com/topic/146359-solved-what-is-up-with-this/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.