Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2689144
D25489.1734728998.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
1 KB
Referenced Files
None
Subscribers
None
D25489.1734728998.diff
View Options
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
@@ -11,7 +11,7 @@
$indexes = array();
$value = $this->getFieldValue();
- if (strlen($value)) {
+ if (phutil_nonempty_scalar($value)) {
$indexes[] = $this->newNumericIndex((int)$value);
}
@@ -53,7 +53,7 @@
PhabricatorCursorPagedPolicyAwareQuery $query,
$value) {
- if (strlen($value)) {
+ if (phutil_nonempty_scalar($value)) {
$query->withApplicationSearchContainsConstraint(
$this->newNumericIndex(null),
$value);
@@ -84,7 +84,7 @@
foreach ($xactions as $xaction) {
$value = $xaction->getNewValue();
- if (strlen($value)) {
+ if (phutil_nonempty_scalar($value)) {
if (!preg_match('/^-?\d+/', $value)) {
$errors[] = new PhabricatorApplicationTransactionValidationError(
$type,
@@ -104,9 +104,9 @@
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
- if (!strlen($old) && strlen($new)) {
+ if (!phutil_nonempty_scalar($old) && phutil_nonempty_scalar($new)) {
return true;
- } else if (strlen($old) && !strlen($new)) {
+ } else if (phutil_nonempty_scalar($old) && !phutil_nonempty_scalar($new)) {
return true;
} else {
return ((int)$old !== (int)$new);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 21:09 (16 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021060
Default Alt Text
D25489.1734728998.diff (1 KB)
Attached To
Mode
D25489: Fix PHP 8.1 "strlen(null)" exception rendering dashboard panel with latest tasks when custom int field configured
Attached
Detach File
Event Timeline
Log In to Comment