mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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
This commit is contained in:
parent
85539ce255
commit
f7dd8f579a
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ final class PhabricatorDashboardAdjustController
|
||||||
}
|
}
|
||||||
|
|
||||||
$column_key = $request->getStr('columnKey');
|
$column_key = $request->getStr('columnKey');
|
||||||
if (strlen($column_key)) {
|
if (phutil_nonempty_string($column_key)) {
|
||||||
$columns = $ref_list->getColumns();
|
$columns = $ref_list->getColumns();
|
||||||
if (!isset($columns[$column_key])) {
|
if (!isset($columns[$column_key])) {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
|
@ -52,7 +52,7 @@ final class PhabricatorDashboardAdjustController
|
||||||
|
|
||||||
$after_ref = null;
|
$after_ref = null;
|
||||||
$after_key = $request->getStr('afterKey');
|
$after_key = $request->getStr('afterKey');
|
||||||
if (strlen($after_key)) {
|
if (phutil_nonempty_string($after_key)) {
|
||||||
$after_ref = $ref_list->getPanelRef($after_key);
|
$after_ref = $ref_list->getPanelRef($after_key);
|
||||||
if (!$after_ref) {
|
if (!$after_ref) {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
|
|
Loading…
Reference in a new issue