mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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
This commit is contained in:
parent
226f315093
commit
2da7594344
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ final class PhabricatorNotificationServersConfigType
|
|||
}
|
||||
|
||||
$path = idx($spec, 'path');
|
||||
if ($type == 'admin' && strlen($path)) {
|
||||
if ($type == 'admin' && phutil_nonempty_string($path)) {
|
||||
throw $this->newException(
|
||||
pht(
|
||||
'Notification server configuration describes an invalid host '.
|
||||
|
|
Loading…
Reference in a new issue