Skip to content

Commit 7f46a25

Browse files
committed
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
1 parent 761134a commit 7f46a25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/applications/notification/client/PhabricatorNotificationServerRef.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ public function getURI($to_path = '') {
161161
return $uri;
162162
}
163163

164-
public function getWebsocketURI($to_path = null) {
164+
public function getWebsocketURI($to_path = '') {
165165
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
166-
if (strlen($instance)) {
166+
if (phutil_nonempty_string($instance)) {
167167
$to_path = $to_path.'~'.$instance.'/';
168168
}
169169

0 commit comments

Comments
 (0)