Page MenuHomePhorge

D25152.1732574465.diff
No OneTemporary

D25152.1732574465.diff

diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -971,14 +971,14 @@
}
$page_key = $request->getURIData('pageKey');
- if (!strlen($page_key)) {
+ if (!phutil_nonempty_string($page_key)) {
$pages = $this->getPages($object);
if ($pages) {
$page_key = head_key($pages);
}
}
- if (strlen($page_key)) {
+ if (phutil_nonempty_string($page_key)) {
$page = $this->selectPage($object, $page_key);
if (!$page) {
return new Aphront404Response();
@@ -1169,7 +1169,7 @@
if ($this->getIsCreate()) {
$template = $request->getStr('template');
- if (strlen($template)) {
+ if (phutil_nonempty_string($template)) {
$template_object = $this->newObjectFromIdentifier(
$template,
array(
diff --git a/src/applications/transactions/editfield/PhabricatorEditField.php b/src/applications/transactions/editfield/PhabricatorEditField.php
--- a/src/applications/transactions/editfield/PhabricatorEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorEditField.php
@@ -418,7 +418,7 @@
}
$instructions = $this->getControlInstructions();
- if (strlen($instructions)) {
+ if (phutil_nonempty_string($instructions)) {
$form->appendRemarkupInstructions($instructions);
}
diff --git a/src/applications/transactions/editfield/PhabricatorTextEditField.php b/src/applications/transactions/editfield/PhabricatorTextEditField.php
--- a/src/applications/transactions/editfield/PhabricatorTextEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorTextEditField.php
@@ -18,7 +18,7 @@
$control = new AphrontFormTextControl();
$placeholder = $this->getPlaceholder();
- if (strlen($placeholder)) {
+ if (phutil_nonempty_string($placeholder)) {
$control->setPlaceholder($placeholder);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 22:41 (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
995780
Default Alt Text
D25152.1732574465.diff (2 KB)

Event Timeline