1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00

Fix PHP 8.1 auth view strlen(null) error

Summary:
Trying to view a Jira auth provider from https://my.phorge.site/auth/ results in strlen(): Passing null to parameter #1 ($string) of type string is deprecated

This change fixes it

Fixes T15634

Test Plan:
Go to https://my.phorge.site/auth/ and have a Jira already setup.
Click on Jira auth provider
Confirm the page is displayed and no error is generated.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15634

Differential Revision: https://we.phorge.it/D25432
This commit is contained in:
sten 2023-09-05 15:14:06 +01:00
parent a65061ddc3
commit a0fb344b94

View file

@ -150,7 +150,7 @@ final class PhabricatorAuthProviderConfigTransaction
$provider = $this->getProvider();
if ($provider) {
$title = $provider->renderConfigPropertyTransactionTitle($this);
if (strlen($title)) {
if (phutil_nonempty_string($title)) {
return $title;
}
}