From 759aa0f8a6f6c00417aa95ad7c4da57f01f5e7f3 Mon Sep 17 00:00:00 2001 From: mainframe98 Date: Sun, 16 Nov 2025 13:41:08 +0100 Subject: [PATCH] Fix PHP 8.1 "strlen(null)" warning in XHProf search Summary: Closes T16339 Test Plan: * Install the xhprof extension * Run any arc command with `--xprofile run.json` * Visit http://phorge.localhost/xhprof/ and upload the xhprof file by drag-and-dropping * Navigate back to http://phorge.localhost/xhprof/ and see the deprecation in the error log * Apply this patch and observe it gone Reviewers: O1 Blessed Committers, aklapper Reviewed By: O1 Blessed Committers, aklapper Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16339 Differential Revision: https://we.phorge.it/D26497 --- src/applications/xhprof/storage/PhabricatorXHProfSample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/xhprof/storage/PhabricatorXHProfSample.php b/src/applications/xhprof/storage/PhabricatorXHProfSample.php index 3384ef3be2..d55b08a63c 100644 --- a/src/applications/xhprof/storage/PhabricatorXHProfSample.php +++ b/src/applications/xhprof/storage/PhabricatorXHProfSample.php @@ -43,7 +43,7 @@ final class PhabricatorXHProfSample public function getDisplayName() { $request_path = $this->getRequestPath(); - if (strlen($request_path)) { + if (phutil_nonempty_string($request_path)) { return $request_path; } -- 2.51.2