Commit 74af0eaa authored by Franco Fichtner's avatar Franco Fichtner

www: fix a crash report in url_safe()

(cherry picked from commit 7f230df7)
parent 36c1a824
...@@ -1007,7 +1007,8 @@ function url_safe($format, $args = array()) ...@@ -1007,7 +1007,8 @@ function url_safe($format, $args = array())
} }
foreach ($args as $id => $arg) { foreach ($args as $id => $arg) {
$args[$id] = urlencode($arg); /* arguments could be empty, so force default */
$args[$id] = !empty($arg) ? urlencode($arg) : '';
} }
return vsprintf($format, $args); return vsprintf($format, $args);
......
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