From ddf26e89c8736b01376a48026f34be412a843b44 Mon Sep 17 00:00:00 2001 From: mainframe98 Date: Sun, 27 Oct 2024 19:47:04 +0100 Subject: [PATCH] DarkConsole: Fix "strlen(null)" but for the "tab" query parameter Summary: See rPf4d2811 Bug: T15344 Test Plan: Opened DarkConsole with /~/, saw no errors in DarkConsole Reviewers: O1 Blessed Committers, aklapper Reviewed By: O1 Blessed Committers, aklapper Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25834 --- src/applications/console/controller/DarkConsoleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/console/controller/DarkConsoleController.php b/src/applications/console/controller/DarkConsoleController.php index 3c4f82feba..e532fd7657 100644 --- a/src/applications/console/controller/DarkConsoleController.php +++ b/src/applications/console/controller/DarkConsoleController.php @@ -35,7 +35,7 @@ final class DarkConsoleController extends PhabricatorController { } $tab = $request->getStr('tab'); - if (strlen($tab)) { + if (phutil_nonempty_string($tab)) { $this->writeDarkConsoleSetting( PhabricatorDarkConsoleTabSetting::SETTINGKEY, $tab);