Commit 7a5373aa by Scott

Fix PHP Notice with array URL parameters

Fixes #691
parent 40f15d44
...@@ -1608,9 +1608,12 @@ function qa_path($request, $params = null, $rooturl = null, $neaturls = null, $a ...@@ -1608,9 +1608,12 @@ function qa_path($request, $params = null, $rooturl = null, $neaturls = null, $a
break; break;
} }
if (isset($params)) if (is_array($params)) {
foreach ($params as $key => $value) foreach ($params as $key => $value) {
$paramsextra .= (strlen($paramsextra) ? '&' : '?') . urlencode($key) . '=' . urlencode((string)$value); $value = is_array($value) ? '' : (string) $value;
$paramsextra .= (strlen($paramsextra) ? '&' : '?') . urlencode($key) . '=' . urlencode($value);
}
}
return $url . $paramsextra . (empty($anchor) ? '' : '#' . urlencode($anchor)); return $url . $paramsextra . (empty($anchor) ? '' : '#' . urlencode($anchor));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment