1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Troubleshooting and Problems' started by Mr. Goodie2Shoes, May 4, 2012.

  1. Mr. Goodie2Shoes

    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?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What version of PHP? Visit admin.php?tools/phpinfo to check your version.
     
  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
  5. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    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...)
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
  7. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    The TaigaChat cleanup runs during that time..
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try manually running that task to see if it generates the error.
     
  9. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    no error logged...
     

Share This Page