From 3703588e9db6a46eb251a0ecc5afc35b62c490e9 Mon Sep 17 00:00:00 2001 From: Steve Campbell Date: Fri, 7 Jul 2023 15:35:32 +0100 Subject: [PATCH] Fix PHP 8.1 strlen(null) in DiffusionView linkBrowse() Summary: Fix PHP 8.1 strlen(null) in DiffusionView linkBrowse(). Fixes T15542 Test Plan: # Go into a diff (eg https://my.phorge.site/D1234) # Click on the Revision Contents - History tab # Click on a base link (the short git revision ID) Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15542 Differential Revision: https://we.phorge.it/D25340 --- src/applications/diffusion/view/DiffusionView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/view/DiffusionView.php b/src/applications/diffusion/view/DiffusionView.php index 795b47c773..268514ff53 100644 --- a/src/applications/diffusion/view/DiffusionView.php +++ b/src/applications/diffusion/view/DiffusionView.php @@ -71,7 +71,7 @@ abstract class DiffusionView extends AphrontView { $display_name = idx($details, 'name'); unset($details['name']); - if (strlen($display_name)) { + if (phutil_nonempty_string($display_name)) { $display_name = phutil_tag( 'span', array(