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

Fixed XenForo_Error fails with php < 5.3

Discussion in 'Resolved Bug Reports' started by Rigel Kentaurus, Feb 8, 2012.

  1. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    XenForo_Error has a call inside debug that makes use of func_get_args()

    Screen Shot 2012-02-08 at 3.43.40 PM.png

    Unfortunately, this cannot be used as a method parameter before php 5.3

    Screen Shot 2012-02-08 at 3.43.10 PM.png

    Because of this, people using PHP 5.3, with debug mode enabled, would get an error when XenForo_Error::debug() is called

    A workaround would be storing the result in a variable instead.

    I checked the XenForo front page and it says compatible with PHP 5.2.6+, so I guess this is a small bug.
    EQnoble, Mike and Luis like this.
  2. Mike

    Mike XenForo Developer Staff Member

    Fixed with this:
    $args = func_get_args();
    new Exception(call_user_func_array('sprintf', $args)),
    EQnoble and Rigel Kentaurus like this.

Share This Page