Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2909427
D25147.1737394946.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
2 KB
Referenced Files
None
Subscribers
None
D25147.1737394946.diff
View Options
diff --git a/src/applications/files/controller/PhabricatorFileDataController.php b/src/applications/files/controller/PhabricatorFileDataController.php
--- a/src/applications/files/controller/PhabricatorFileDataController.php
+++ b/src/applications/files/controller/PhabricatorFileDataController.php
@@ -29,7 +29,7 @@
$request_kind = $request->getURIData('kind');
$is_download = ($request_kind === 'download');
- if (!strlen($alt) || $main_domain == $alt_domain) {
+ if (!phutil_nonempty_string($alt) || $main_domain == $alt_domain) {
// No alternate domain.
$should_redirect = false;
$is_alternate_domain = false;
diff --git a/src/applications/search/field/PhabricatorSearchDateField.php b/src/applications/search/field/PhabricatorSearchDateField.php
--- a/src/applications/search/field/PhabricatorSearchDateField.php
+++ b/src/applications/search/field/PhabricatorSearchDateField.php
@@ -17,7 +17,7 @@
}
protected function validateControlValue($value) {
- if (!strlen($value)) {
+ if (!phutil_nonempty_scalar($value)) {
return;
}
@@ -32,7 +32,7 @@
}
protected function parseDateTime($value) {
- if (!strlen($value)) {
+ if (!phutil_nonempty_scalar($value)) {
return null;
}
diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php
--- a/src/view/layout/AphrontSideNavFilterView.php
+++ b/src/view/layout/AphrontSideNavFilterView.php
@@ -92,12 +92,21 @@
return $this->getMenuView()->getItem($key);
}
+ /**
+ * Add a thing in the menu
+ *
+ * @param string $key Internal name
+ * @param string $name Human name
+ * @param mixed $uri Destination URI. For example as string or as PhutilURI.
+ * @param string $type Item type. For example see PHUIListItemView constants.
+ * @param string $icon Icon name
+ */
private function addThing($key, $name, $uri, $type, $icon = null) {
$item = id(new PHUIListItemView())
->setName($name)
->setType($type);
- if (strlen($icon)) {
+ if (phutil_nonempty_string($icon)) {
$item->setIcon($icon);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 17:42 (1 d, 13 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1130682
Default Alt Text
D25147.1737394946.diff (2 KB)
Attached To
Mode
D25147: Fix PHP 8.1 "strlen(null)" exceptions which block rendering the People page
Attached
Detach File
Event Timeline
Log In to Comment