@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 API maniphest.update in PHP 8.0.0+

Summary:
Fix this crash in PHP 8.0.0+:

{
"error": "Error",
"errorMessage": "Error: <maniphest.update> Unknown named parameter $comments",
"response": null
}

Thanks taavi for reporting and mainframe98 for fast troubleshooting.

Closes T16467

Test Plan:
echo '{
"id": 1,
"comments": "Test comment creation on maniphest.update on task T1"
}' | arc call-conduit --conduit-uri http://phorge.localhost/ -- maniphest.update

Reviewers: taavi, mainframe98, O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16467

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

+5 -1
+5 -1
src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
··· 60 60 $task = $query->executeOne(); 61 61 62 62 $params = $request->getAllParameters(); 63 + 64 + // Strip non-actions for the next validation. 63 65 unset($params['id']); 64 66 unset($params['phid']); 65 67 66 - if (call_user_func_array('coalesce', $params) === null) { 68 + // Require at least one non-null action. 69 + $param_values = array_values($params); 70 + if (call_user_func_array('coalesce', $param_values) === null) { 67 71 throw new ConduitException('ERR-NO-EFFECT'); 68 72 } 69 73