diff --git a/src/parser/PhutilURI.php b/src/parser/PhutilURI.php --- a/src/parser/PhutilURI.php +++ b/src/parser/PhutilURI.php @@ -154,9 +154,9 @@ $user = $this->user; $pass = $this->pass; - if (strlen($user) && strlen($pass)) { + if (phutil_nonempty_string($user) && phutil_nonempty_string($pass)) { $auth = rawurlencode($user).':'.rawurlencode($pass).'@'; - } else if (strlen($user)) { + } else if (phutil_nonempty_string($user)) { $auth = rawurlencode($user).'@'; } else { $auth = null;