@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix HTTP 200 error setting non-string task points via Conduit API

Summary:
Do not require strings but allow scalars when setting task points.

```
EXCEPTION: (InvalidArgumentException) Call to phutil_nonempty_string() expected null or a string, got: float. at [<arcanist>/src/utils/utils.php:2121]
#0 <#2> phutil_nonempty_string(double) called at [<phorge>/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php:85]
```
Closes T16262

Test Plan:
* Have points enabled via http://phorge.localhost/config/edit/maniphest.points/
* Run `echo '{"transactions": [{"type": "points", "value":13}, {"type": "comment", "value":"Setting points!"}],"objectIdentifier":"T1234"}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-whatever" maniphest.edit --`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16262

Differential Revision: https://we.phorge.it/D26337

+1 -1
+1 -1
src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
··· 82 82 83 83 foreach ($xactions as $xaction) { 84 84 $new = $xaction->getNewValue(); 85 - if (phutil_nonempty_string($new) && !is_numeric($new)) { 85 + if (phutil_nonempty_scalar($new) && !is_numeric($new)) { 86 86 $errors[] = $this->newInvalidError( 87 87 pht('Points value must be numeric or empty.')); 88 88 continue;