Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694520
D25367.1734787058.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
3 KB
Referenced Files
None
Subscribers
None
D25367.1734787058.diff
View Options
diff --git a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php
--- a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php
+++ b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php
@@ -32,7 +32,7 @@
$panel_ref = null;
$panel_key = $request->getStr('panelKey');
- if (strlen($panel_key)) {
+ if ($panel_key !== null && strlen($panel_key)) {
$panel_ref = $ref_list->getPanelRef($panel_key);
if (!$panel_ref) {
return new Aphront404Response();
diff --git a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php
--- a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php
+++ b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php
@@ -41,12 +41,12 @@
$op = $request->getURIData('op');
$after = $request->getStr('after');
- if (!strlen($after)) {
+ if ($after === '') {
$after = null;
}
$target = $request->getStr('target');
- if (!strlen($target)) {
+ if ($target === '') {
$target = null;
}
diff --git a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
--- a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
+++ b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
@@ -155,6 +155,7 @@
return $this->renderNormalPanel();
} catch (Exception $ex) {
+ phlog($ex);
return $this->renderErrorPanel(
$panel->getName(),
pht(
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
@@ -100,7 +100,7 @@
$panel_id = idx($tab_spec, 'panelID');
$subpanel = idx($panels, $panel_id);
- $name = idx($tab_spec, 'name');
+ $name = coalesce(idx($tab_spec, 'name'), '');
if (!strlen($name)) {
if ($subpanel) {
$name = $subpanel->getName();
diff --git a/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php b/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php
--- a/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php
+++ b/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php
@@ -27,7 +27,7 @@
PhabricatorSavedQuery $saved,
array $map) {
- if (!strlen($map['query'])) {
+ if (!(isset($map['query']) && strlen($map['query']))) {
return;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 13:17 (18 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021159
Default Alt Text
D25367.1734787058.diff (3 KB)
Attached To
Mode
D25367: Various PHP 8.1 strlen(null) fixes for Dashboard Panels
Attached
Detach File
Event Timeline
Log In to Comment