Merge branch 'development' of https://github.com/skipperbent/simple-php-router into development

Conflicts:
	src/Pecee/SimpleRouter/RouterBase.php
This commit is contained in:
Simon Sessingø
2015-12-11 18:23:19 +01:00
8 changed files with 19 additions and 18 deletions
+5 -4
View File
@@ -220,10 +220,10 @@ class RouterBase {
}
public function arrayToParams(array $getParams = null, $includeEmpty = true) {
if(is_array($getParams) && count($getParams) > 0) {
foreach($getParams as $key=>$val) {
if(!empty($val) || empty($val) && $includeEmpty) {
$getParams[$key] = $key.'='.$val;
if (is_array($getParams) && count($getParams) > 0) {
foreach ($getParams as $key => $val) {
if (!empty($val) || empty($val) && $includeEmpty) {
$getParams[$key] = $key . '=' . $val;
}
}
return join('&', $getParams);
@@ -345,6 +345,7 @@ class RouterBase {
$url = '/' . trim(join('/', $url), '/') . '/';
if($getParams !== null && count($getParams)) {
$url .= '?' . $this->arrayToParams($getParams);
}