MyBB Community Forums

Full Version: [Upgrade Error] Function name must be a string.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just upgraded to myBB 1.6.5 and got the following error:

Fatal error: Function name must be a string in /home/berlingo/public_html/inc/class_plugins.php on line 101

the file in question.




Just to update, i did the following and has brought my forum back online, but i want to know if it is an OK correction or not.

if(is_array($hooks))
			{
				foreach($hooks as $hook)
				{
					if($hook['file'])
					{
						require_once $hook['file'];
					}
					
					$func = $hook['function'];
					$returnargs = $func($arguments);
					
					
					if($returnargs)
					{
						$arguments = $returnargs;
					}
				}
			}
		}
		$this->current_hook = '';
		return $arguments;

to:
if($hook['file'])
					{
						require_once $hook['file'];
					}
					
					$returnargs = call_user_func_array($hook['function'], array(&$arguments));
					
					
					if($returnargs)
					{
						$arguments = $returnargs;
There appears to be no difference between the two code blocks, though you should edit your post and change from code tags to php tags so it has syntax highlighting. However, that is not the code that exists in the 1.6.5 files. Please make sure you've uploaded all files and uploaded them all to the appropriate places.
(2011-12-02, 03:58 PM)Dylan M. Wrote: [ -> ]There appears to be no difference between the two code blocks, though you should edit your post and change from code tags to php tags so it has syntax highlighting. However, that is not the code that exists in the 1.6.5 files. Please make sure you've uploaded all files and uploaded them all to the appropriate places.

What is going on? Everytime i try to paste what is in the 1.6.5 class_plugins.php it keeps reverting it to what is in the second block of code Confused

I've attached the details in the file attached.

[attachment=24888]

And Omar, i am not using that plugin no, but i am using one called View Unread Posts by someone called Lukaz.

Bumping this for some help? Don't want to be exposed!
It's not a problem with the code, you're using a plugin that was written in an unsupported way and now doesn't work on 1.6.5.
Could this plugin be causing the issue?

http://community.mybb.com/thread-71986.html
Probably, that's one plugin I know of that was written in an unsupported way and broke on 1.6.5.