mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed get-parameters as array (param[id]=value) causing array-to-string notice.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user