mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +01:00
Fix a PHP 8.1/8.2 deprecated use of strlen a NULL argument
Summary: This commit harmonizes PhabricatorNotificationServerRef's getURI and getWebsocketURI methods as discussed in D25382. Test Plan: This is hard to say since I didn't know how/when this function might be called. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25401
This commit is contained in:
parent
761134a1a9
commit
7f46a252f2
1 changed files with 2 additions and 2 deletions
|
@ -161,9 +161,9 @@ final class PhabricatorNotificationServerRef
|
||||||
return $uri;
|
return $uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWebsocketURI($to_path = null) {
|
public function getWebsocketURI($to_path = '') {
|
||||||
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
|
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
|
||||||
if (strlen($instance)) {
|
if (phutil_nonempty_string($instance)) {
|
||||||
$to_path = $to_path.'~'.$instance.'/';
|
$to_path = $to_path.'~'.$instance.'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue