Given this code:
Which when executed by the Tapatalk mobile app, produces this error:
Does the following seem like a reasonable solution?
Because, it doesn't work
Regardless of what conditionals I wrap around this line:
Tapatalk always throws this error:
Normal forum operation is fine. It's only a problem when we access the forum via the Tapatalk app.
PHP:
public static function controllerPreDispatch(XenForo_Controller $controller, $action)
{
self::$controllerName = $controller->getRouteMatch()->getControllerName();
}
Which when executed by the Tapatalk mobile app, produces this error:
Code:
ErrorException: Fatal Error: Call to a member function getControllerName() on a non-object - library/AVForums/Banners/Listener.php:288
Does the following seem like a reasonable solution?
PHP:
public static function controllerPreDispatch(XenForo_Controller $controller, $action)
{
try
{
if (is_object($controller) && $controller instanceof XenForo_Controller)
{
self::$controllerName = $controller->getRouteMatch()->getControllerName();
}
}
catch (Exception $e)
{
self::$controllerName = '';
}
}
Because, it doesn't work
Regardless of what conditionals I wrap around this line:
PHP:
self::$controllerName = $controller->getRouteMatch()->getControllerName();
Tapatalk always throws this error:
Code:
ErrorException: Fatal Error: Call to a member function getControllerName() on a non-object - library/AVForums/Banners/Listener.php:288
Normal forum operation is fine. It's only a problem when we access the forum via the Tapatalk app.