Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694256
D25222.1734775615.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
918 B
Referenced Files
None
Subscribers
None
D25222.1734775615.diff
View Options
diff --git a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
--- a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
+++ b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
@@ -97,8 +97,17 @@
return 'fa-calculator';
}
+ /**
+ * Normalize your Story Points from generic stuff to double or null.
+ * @param mixed $value Your raw Story Points
+ * @return double|null
+ */
private function getValueForPoints($value) {
- if (!strlen($value)) {
+ // The Point can be various types also thanks to Conduit API
+ // like integers, floats, null, and strings of course.
+ // Everything meaningful must be printable as a string.
+ $is_empty = phutil_string_cast($value) === '';
+ if ($is_empty) {
$value = null;
}
if ($value !== null) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 10:06 (17 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1023013
Default Alt Text
D25222.1734775615.diff (918 B)
Attached To
Mode
D25222: Fix PHP 8.1 "strlen(null)" exception setting Story Points on a Task
Attached
Detach File
Event Timeline
Log In to Comment