From 43e05ad821f211e90858d9596d36b6cffb6e239c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Thu, 27 Oct 2016 19:15:38 +0200 Subject: [PATCH] Minor optimisations --- src/Pecee/SimpleRouter/RouterBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pecee/SimpleRouter/RouterBase.php b/src/Pecee/SimpleRouter/RouterBase.php index 85186a9..7177903 100644 --- a/src/Pecee/SimpleRouter/RouterBase.php +++ b/src/Pecee/SimpleRouter/RouterBase.php @@ -303,7 +303,7 @@ class RouterBase { public function arrayToParams(array $getParams = null, $includeEmpty = true) { - if(is_array($getParams)) { + if(is_array($getParams) && count($getParams)) { if ($includeEmpty === false) { $getParams = array_filter($getParams, function ($item) { return (!empty($item));