Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2938555
D25144.1738013052.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
D25144.1738013052.diff
View Options
diff --git a/src/applications/meta/query/PhabricatorAppSearchEngine.php b/src/applications/meta/query/PhabricatorAppSearchEngine.php
--- a/src/applications/meta/query/PhabricatorAppSearchEngine.php
+++ b/src/applications/meta/query/PhabricatorAppSearchEngine.php
@@ -45,7 +45,7 @@
->withUnlisted(false);
$name = $saved->getParameter('name');
- if (strlen($name)) {
+ if (phutil_nonempty_string($name)) {
$query->withNameContains($name);
}
diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php
--- a/src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php
@@ -115,7 +115,7 @@
if ($this->queryKey == 'advanced') {
$run_query = false;
$query_key = $request->getStr('query');
- } else if (!strlen($this->queryKey)) {
+ } else if (!phutil_nonempty_string($this->queryKey)) {
$found_query_data = false;
if ($request->isHTTPGet() || $request->isQuicksand()) {
@@ -775,7 +775,7 @@
$force_nux) {
// Don't render NUX if the user has clicked away from the default page.
- if (strlen($this->getQueryKey())) {
+ if (phutil_nonempty_string($this->getQueryKey())) {
return null;
}
diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
--- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
@@ -179,7 +179,7 @@
$order = $saved->getParameter('order');
$builtin = $query->getBuiltinOrderAliasMap();
- if (strlen($order) && isset($builtin[$order])) {
+ if (phutil_nonempty_string($order) && isset($builtin[$order])) {
$query->setOrder($order);
} else {
// If the order is invalid or not available, we choose the first
diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php
--- a/src/view/form/control/AphrontFormTokenizerControl.php
+++ b/src/view/form/control/AphrontFormTokenizerControl.php
@@ -68,7 +68,7 @@
$datasource->setViewer($this->getUser());
$placeholder = null;
- if (!strlen($this->placeholder)) {
+ if (!phutil_nonempty_string($this->placeholder)) {
$placeholder = $datasource->getPlaceholderText();
}
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
@@ -145,7 +145,7 @@
public function selectFilter($key, $default = null) {
$this->selectedFilter = $default;
- if ($this->menu->getItem($key) && strlen($key)) {
+ if ($this->menu->getItem($key) && phutil_nonempty_string($key)) {
$this->selectedFilter = $key;
}
return $this->selectedFilter;
diff --git a/src/view/phui/PHUIInfoView.php b/src/view/phui/PHUIInfoView.php
--- a/src/view/phui/PHUIInfoView.php
+++ b/src/view/phui/PHUIInfoView.php
@@ -147,7 +147,7 @@
}
$title = $this->title;
- if ($title || strlen($title)) {
+ if ($title || phutil_nonempty_string($title)) {
$title = phutil_tag(
'h1',
array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 21:24 (2 d, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1133869
Default Alt Text
D25144.1738013052.diff (3 KB)
Attached To
Mode
D25144: Fix numerous PHP 8.1 "strlen(null)" exceptions which block rendering the Applications page
Attached
Detach File
Event Timeline
Log In to Comment