1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 03:32:42 +01:00
phorge-phorge/src/applications/maniphest/xaction
Andre Klapper 538cccc63e Fix PHP 8.1 "strlen(null)" exception setting Story Points on a Task
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Here we adopt `phutil_string_cast()` to
reply to the question "is this an empty string?".

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_string_cast() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

Closes T15390

Test Plan:
Enable `maniphest.points` in settings, for example with:

```
./bin/config set maniphest.points --stdin <<< '{"enabled":true}'
```

Then try to create a Task: it does not explode anymore in PHP 8.1+.

Also try to set various possible values from the Conduit API method "maniphest.edit".

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15390

Differential Revision: https://we.phorge.it/D25222
2023-05-23 11:57:45 +02:00
..
ManiphestTaskAttachTransaction.php Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
ManiphestTaskCoverImageTransaction.php Raise a more tailored exception if transform/thumbnail support is missing for cover images 2019-03-26 15:16:31 -07:00
ManiphestTaskDescriptionTransaction.php Fill in some straightforward Maniphest transactions for transaction.search 2017-11-07 15:33:55 -08:00
ManiphestTaskEdgeTransaction.php Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
ManiphestTaskMergedFromTransaction.php Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
ManiphestTaskMergedIntoTransaction.php Track closed date and closing user for tasks explicitly 2018-02-08 15:40:49 -08:00
ManiphestTaskOwnerTransaction.php Remove product literal strings in "pht()", part 20 2022-04-25 16:46:25 -07:00
ManiphestTaskParentTransaction.php Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
ManiphestTaskPointsTransaction.php Fix PHP 8.1 "strlen(null)" exception setting Story Points on a Task 2023-05-23 11:57:45 +02:00
ManiphestTaskPriorityTransaction.php Stabilize sorting of feed stories with similar strength 2019-05-22 15:50:59 -07:00
ManiphestTaskStatusTransaction.php Stabilize sorting of feed stories with similar strength 2019-05-22 15:50:59 -07:00
ManiphestTaskSubpriorityTransaction.php Remove all readers/writers for task "subpriority" 2019-03-12 12:57:04 -07:00
ManiphestTaskTitleTransaction.php Stabilize sorting of feed stories with similar strength 2019-05-22 15:50:59 -07:00
ManiphestTaskTransactionType.php Track closed date and closing user for tasks explicitly 2018-02-08 15:40:49 -08:00
ManiphestTaskUnblockTransaction.php Don't require any special capabilities to apply a "closed a subtask" transaction to a parent task 2019-02-28 19:48:28 -08:00