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



Well-known member
I am not sure if this is a bug or just me .....
I want to Listen to Event : template_post_render
I Use this code :
class DroidHost_template
    public function modify($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
        if ($templateName == 'message_content thread_view')
and I have this err .........
An exception occurred: call_user_func_array() expects parameter 1 to be a valid callback, non-static method DroidHost_template::modify() should not be called statically in C:\xampp\htdocs\xen\library\XenForo\CodeEvent.php on line 54

    call_user_func_array() in XenForo/CodeEvent.php at line 54
    XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 195
    XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 100
    XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 119
    XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 565
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
    XenForo_FrontController->run() in C:/xampp/htdocs/xen/index.php at line 13
is the way I use in the code is wrong ....


XenForo developer
Staff member
Your event listener isn't specified correctly. I think you might've messed up the case of the class name (lowercase "t").