Jon W
Well-known member
There are three methods in XenForo which allow for partial class names to be used.
These are:
XenForo_BbCode_Formatter_Base::create
XenForo_Deferred_Abstract::create
XenForo_Controller->getHelper
All three methods use the following line of code to check whether a partial or full class name has been used:
This follows the assumption that all full class names will contain an underscore. However, this assumption is not always correct if namespaces are used.
I suggest that it be replaced with the following code:
or something similar.
Thanks.
These are:
XenForo_BbCode_Formatter_Base::create
XenForo_Deferred_Abstract::create
XenForo_Controller->getHelper
All three methods use the following line of code to check whether a partial or full class name has been used:
Code:
if (strpos($class, '_') === false)
This follows the assumption that all full class names will contain an underscore. However, this assumption is not always correct if namespaces are used.
I suggest that it be replaced with the following code:
Code:
if (strpos($class, '_') === false && strpos($class, '\\') === false)
Thanks.