From a0fb344b94883d54fb958aa78f9a8c715ffae185 Mon Sep 17 00:00:00 2001 From: sten Date: Tue, 5 Sep 2023 15:14:06 +0100 Subject: [PATCH] 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 --- .../auth/storage/PhabricatorAuthProviderConfigTransaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php b/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php index f60ba8c734..d7f974cb15 100644 --- a/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php +++ b/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php @@ -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; } }