I had this class:
<?php class acController { protected $_enabledPages = array( 'front_login.php', ); protected $_enabledDirectories = array ( 'admin' ); public static function isAuthorized() { echo '<pre>'; acController::checkResource($_SERVER['SCRIPT_URI'], $this->_enabledDirectories); acController::checkResource($_SERVER['SCRIPT_URI'], $this->_enabledDirectories); echo '</pre>'; } protected static function checkResource($urlAddress, $addressArray) {} } ?> And I got this error:
Fatal error: Using $this when not in object context
But in this case, $this is used within the class and I can't understand where the problem is. In other files, I get the information with acController::isAuthorized();
static: Are you instantiating an acController instance?