@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix a PHP 8.1/8.2 deprecated call to strlen with a NULL argument

Summary:
This call was preventing notification servers configuration to be properly initialized.
Indeed, strlen() was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts phutil_nonempty_string() as a replacement.

Fix T15596

Test Plan:
Sign in as an administrator, configure the notification server without filling admin path field,
you shouldn't get an invalid configuration error

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15596

Differential Revision: https://we.phorge.it/D25381

authored by

root and committed by
bob
2da75943 226f3150

+1 -1
+1 -1
src/applications/notification/config/PhabricatorNotificationServersConfigType.php
··· 92 92 } 93 93 94 94 $path = idx($spec, 'path'); 95 - if ($type == 'admin' && strlen($path)) { 95 + if ($type == 'admin' && phutil_nonempty_string($path)) { 96 96 throw $this->newException( 97 97 pht( 98 98 'Notification server configuration describes an invalid host '.