Page MenuHomePhorge

D25147.1737395011.diff
No OneTemporary

D25147.1737395011.diff

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_string($value)) {
return;
}
@@ -32,7 +32,7 @@
}
protected function parseDateTime($value) {
- if (!strlen($value)) {
+ if (!phutil_nonempty_string($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
@@ -97,7 +97,7 @@
->setName($name)
->setType($type);
- if (strlen($icon)) {
+ if (phutil_nonempty_string($icon)) {
$item->setIcon($icon);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 17:43 (1 d, 13 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1133863
Default Alt Text
D25147.1737395011.diff (1 KB)

Event Timeline