Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2653805
D25152.1732574465.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
D25152.1732574465.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25152: Fix PHP 8.1 "strlen(null)" exceptions which block rendering the Maniphest task creation page
Attached
Detach File
Event Timeline
Log In to Comment