guiltar
Well-known member
Hello Kier and Mike!
Maybe this issue can't be called a bug in a full meaning but it leads to ignoring errors by addon devs and incorrect work of some core methods.
For example, there was a method className::methodName()
It was extended in some addon.
Then in newer XenForo version it gained argument className::methodName($isDelete = false)
In this case the old addon (without args in declaration) works fine without Debug and doesn't log anything!
Please, look at the XenForo_Application::handlePhpError()
It has code:
What I suggest is to add logging to the first "if" statement like in the second "else if":
Maybe this issue can't be called a bug in a full meaning but it leads to ignoring errors by addon devs and incorrect work of some core methods.
For example, there was a method className::methodName()
It was extended in some addon.
Then in newer XenForo version it gained argument className::methodName($isDelete = false)
In this case the old addon (without args in declaration) works fine without Debug and doesn't log anything!
Please, look at the XenForo_Application::handlePhpError()
It has code:
PHP:
if (!self::debugMode())
{
if ($errorType & E_STRICT
|| (defined('E_DEPRECATED') && $errorType & E_DEPRECATED)
|| (defined('E_USER_DEPRECATED') && $errorType & E_USER_DEPRECATED))
{
$trigger = false;
}
else if ($errorType & E_NOTICE || $errorType & E_USER_NOTICE)
{
$trigger = false;
$e = new ErrorException($errorString, 0, $errorType, $file, $line);
XenForo_Error::logException($e, false);
}
}
What I suggest is to add logging to the first "if" statement like in the second "else if":
PHP:
if (!self::debugMode())
{
if ($errorType & E_STRICT
|| (defined('E_DEPRECATED') && $errorType & E_DEPRECATED)
|| (defined('E_USER_DEPRECATED') && $errorType & E_USER_DEPRECATED))
{
$trigger = false;
$e = new ErrorException($errorString, 0, $errorType, $file, $line);
XenForo_Error::logException($e, false);
}
else if ($errorType & E_NOTICE || $errorType & E_USER_NOTICE)
{
$trigger = false;
$e = new ErrorException($errorString, 0, $errorType, $file, $line);
XenForo_Error::logException($e, false);
}
}
Last edited: