mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Fix more PHP 8.1 "strlen(null)" callsites in PhutilURI
Summary: Ref T13676. Ref T13588. These properties on PhutilURI have flexible types, just wrap them. Test Plan: Built a new Drydock working copy with an HTTPS URI under PHP 8.1, see T13676. Maniphest Tasks: T13676, T13588 Differential Revision: https://secure.phabricator.com/D21798
This commit is contained in:
parent
8d487ed770
commit
e5b92735c6
1 changed files with 2 additions and 2 deletions
|
@ -154,9 +154,9 @@ final class PhutilURI extends Phobject {
|
||||||
|
|
||||||
$user = $this->user;
|
$user = $this->user;
|
||||||
$pass = $this->pass;
|
$pass = $this->pass;
|
||||||
if (strlen($user) && strlen($pass)) {
|
if (phutil_nonempty_string($user) && phutil_nonempty_string($pass)) {
|
||||||
$auth = rawurlencode($user).':'.rawurlencode($pass).'@';
|
$auth = rawurlencode($user).':'.rawurlencode($pass).'@';
|
||||||
} else if (strlen($user)) {
|
} else if (phutil_nonempty_string($user)) {
|
||||||
$auth = rawurlencode($user).'@';
|
$auth = rawurlencode($user).'@';
|
||||||
} else {
|
} else {
|
||||||
$auth = null;
|
$auth = null;
|
||||||
|
|
Loading…
Reference in a new issue