[BUGFIX] Fixed get-parameters as array (param[id]=value) causing array-to-string notice.

This commit is contained in:
Simon Sessingø
2016-04-14 23:52:08 +02:00
parent 3da7c4b446
commit 7a429cec1d
+2 -2
View File
@@ -300,8 +300,8 @@ 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 (!empty($val) || $includeEmpty) {
$getParams[$key] = (is_array($val) ? $this->arrayToParams($val, $includeEmpty) : $key . '=' . $val);
}
}
return join('&', $getParams);