Getting this error logged in my error_log file... any help?

Mr. Goodie2Shoes

Well-known member
My server's error_log file is full of this:
Code:
[04-May-2012 06:49:56] PHP Fatal error:  func_get_args(): Can't be used as a function parameter in /home/~~~~~~/public_html/library/XenForo/Error.php on line 193
any help?
 
I found some interesting reports about this error. This is apparently a PHP bug. Some people say the problem is fixed in PHP 5.3, but of course XenForo is supposed to work with PHP 5.2.4.

I found a code fix you can try. Are you able to reproduce this error on demand such that you can test a fix?

library/XenForo/Error.php

Change this function:

Code:
	public static function debug($message)
	{
		if (!XenForo_Application::debugMode())
		{
			return;
		}

		self::logException(
			new Exception(call_user_func_array('sprintf', func_get_args())),
			false
		);
	}

To this:

Code:
	public static function debug($message)
	{
		if (!XenForo_Application::debugMode())
		{
			return;
		}

		$args = func_get_args();

		self::logException(
			new Exception(call_user_func_array('sprintf', $args)),
			false
		);
	}

I can test this for you if you give me access to your forum and server, but I'm about to sleep.
 
thanks... I will see what I can do... apparently, I have to wait for a day to reproduce the error (I dunno how but the error is logged every 24 hours...)

It might be from a cron then:

Admin CP -> Tools -> Cron Entries

Does the error have a stack trace to go with it? A stack trace would help to identify what is generating the error.
 
Top Bottom