1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +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:
bob 2023-08-18 09:19:42 +02:00
parent 761134a1a9
commit 7f46a252f2

View file

@ -161,9 +161,9 @@ final class PhabricatorNotificationServerRef
return $uri;
}
public function getWebsocketURI($to_path = null) {
public function getWebsocketURI($to_path = '') {
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
if (strlen($instance)) {
if (phutil_nonempty_string($instance)) {
$to_path = $to_path.'~'.$instance.'/';
}