From 3546e1b9f78d034f059175493bc2793cb1e40ac5 Mon Sep 17 00:00:00 2001 From: palicao Date: Sun, 8 Mar 2015 17:06:42 +0100 Subject: [PATCH] Small syntax fixes to avoid PHP notices and to pass tests --- src/PHPRouter/Route.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PHPRouter/Route.php b/src/PHPRouter/Route.php index e2c326d..32ffa42 100755 --- a/src/PHPRouter/Route.php +++ b/src/PHPRouter/Route.php @@ -69,8 +69,8 @@ class Route { $this->url = $resource; $this->config = $config; - $this->methods = $config['methods'] ?: array(); - $this->target = $config['target'] ?: null; + $this->methods = isset($config['methods']) ? $config['methods'] : array(); + $this->target = isset($config['target']) ? $config['target'] : null; } public function getUrl() @@ -153,6 +153,6 @@ class Route { $action = explode('::', $this->config['_controller']); $instance = new $action[0]; - call_user_func_array(array($instance, $action[1]), $this->_parameters); + call_user_func_array(array($instance, $action[1]), $this->parameters); } } -- 2.11.0