diff --git a/lib/util.php b/lib/util.php index e2c9c67a1e..4e318a7702 100644 --- a/lib/util.php +++ b/lib/util.php @@ -685,9 +685,11 @@ function common_fancy_url($action, $args=NULL) { case 'userbyid': return common_path('user/'.$args['id']); case 'recoverpassword': - return common_path('main/recoverpassword' . - ($args['code']) ? ('/' . $args['code']) : - ''); + $path = 'main/recoverpassword'; + if ($args['code']) { + $path .= '/' . $args['code']; + } + return common_path($path); default: return common_simple_url($action, $args); }