mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 11:42:13 +00:00
Merge pull request #118 from skipperbent/development
Minor optimisations
This commit is contained in:
@@ -303,7 +303,7 @@ class RouterBase {
|
|||||||
|
|
||||||
public function arrayToParams(array $getParams = null, $includeEmpty = true) {
|
public function arrayToParams(array $getParams = null, $includeEmpty = true) {
|
||||||
|
|
||||||
if(is_array($getParams)) {
|
if(is_array($getParams) && count($getParams)) {
|
||||||
if ($includeEmpty === false) {
|
if ($includeEmpty === false) {
|
||||||
$getParams = array_filter($getParams, function ($item) {
|
$getParams = array_filter($getParams, function ($item) {
|
||||||
return (!empty($item));
|
return (!empty($item));
|
||||||
|
|||||||
Reference in New Issue
Block a user