Page MenuHomePhorge

D25146.1736663890.diff
No OneTemporary

D25146.1736663890.diff

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
@@ -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/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

Mime Type
text/plain
Expires
Sun, Jan 12, 06:38 (5 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1112166
Default Alt Text
D25146.1736663890.diff (2 KB)

Event Timeline