@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix /dashboard/adjust/remove/ PHP 8.1 strlen(null) errors

Summary:
/dashboard/adjust/remove/ POST requests fail under PHP 8.1 with strlen(null) errors.

This change fixes it.

Fixes T15549

Test Plan:
View a dashboard which has some panels. Eg https://my.phorge.site/dashboard/view/1/
Click on a 'Manage Panel' dropdown and click on 'Remove Panel'

Confirm the panel is removed and no strlen(null) errors are generated.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15549

Differential Revision: https://we.phorge.it/D25345

+2 -2
+2 -2
src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php
··· 42 42 } 43 43 44 44 $column_key = $request->getStr('columnKey'); 45 - if (strlen($column_key)) { 45 + if (phutil_nonempty_string($column_key)) { 46 46 $columns = $ref_list->getColumns(); 47 47 if (!isset($columns[$column_key])) { 48 48 return new Aphront404Response(); ··· 52 52 53 53 $after_ref = null; 54 54 $after_key = $request->getStr('afterKey'); 55 - if (strlen($after_key)) { 55 + if (phutil_nonempty_string($after_key)) { 56 56 $after_ref = $ref_list->getPanelRef($after_key); 57 57 if (!$after_ref) { 58 58 return new Aphront404Response();