In the last line of redirection/redirection.php
$redirection should declared as global, explicitly, because if I initiate WordPress inside a class, then all variables will be set as global variable. For example, this Symfony bundle: https://github.com/kayue/WordpressBundle/blob/master/Wordpress/ApiLoader.php#L73
This can be fix by simply using this line:
$GLOBALS[‘redirection’] = new Redirection;
- The topic ‘$redirection should declared as global, explicitly’ is closed to new replies.