Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2680946
D25439.1734631067.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
1020 B
Referenced Files
None
Subscribers
None
D25439.1734631067.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
@@ -84,7 +84,7 @@
foreach ($xactions as $xaction) {
$value = $xaction->getNewValue();
- if (strlen($value)) {
+ if ($value !== null) {
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 ($old === null && $new !== null) {
return true;
- } else if (strlen($old) && !strlen($new)) {
+ } else if ($old !== null && $new === null) {
return true;
} else {
return ((int)$old !== (int)$new);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 17:57 (17 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015282
Default Alt Text
D25439.1734631067.diff (1020 B)
Attached To
Mode
D25439: Fix strlen(null) errors for projects with integer fields under PHP 8.1
Attached
Detach File
Event Timeline
Log In to Comment