Skip to content

Commit

Permalink
Fixed php warning into method execute_controller()
Browse files Browse the repository at this point in the history
  • Loading branch information
Wibeset committed Aug 19, 2010
1 parent f45fca5 commit 59efbf1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Service.php
Expand Up @@ -93,20 +93,21 @@ protected function initialize()
*/
protected function execute_controller()
{
$map_to = ($map_to = $this->route['map_to']) ? $map_to.'/' : '';
$map_to = (isset($this->route['map_to']) ? $this->route['map_to'].'/' : '');
$controller_name = $this->route['controller'];
$action_name = $this->route['action'];

// controller exists?
if (!file_exists(ABSPATH.'app/controllers/'.$map_to.ucfirst($controller_name).'.php')) {
redirect_to('');
}
}

// log execution...
if (isset(app()->config['logger']) && isset(app()->config['logger']['core'])
&& app()->config['logger']['core'] == true)
&& app()->config['logger']['core'] == true) {
logdata('Executing controler '.$map_to.$controller_name.'/'.$action_name.' from request '.
$this->route['request']);
$this->route['request']);
}

//
require_once ABSPATH.'app/controllers/'.$map_to.ucfirst($controller_name).'.php';
Expand Down Expand Up @@ -168,4 +169,4 @@ public static function get_instance()

} // get_instance()

} // Lity_Service
} // Lity_Service

0 comments on commit 59efbf1

Please sign in to comment.