Page MenuHomePhabricator

ERROR 2: Invalid argument supplied for foreach when calling project.query
Closed, ResolvedPublic

Description

I don't think it's causing anything terrible and it's probably just a missing if ($slugs) {} around the foreach.

echo '{"names":["squad-operations"]}' | arc call-conduit project.query
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"data":{"PHID-PROJ-udkmhwtwhqheniv62qxc":{"id":"2","phid":"PHID-PROJ-udkmhwtwhqheniv62qxc","name":"squad-operations","members":["PHID-USER-pyrgyo7kprsfnq3lnmdy","PHID-USER-34beq5qwuaaryyipe7jl","PHID-USER-dai2fks472tkmt7pooqf","PHID-USER-de6rgem3dblcfaci7jao","PHID-USER-fwd766r6xo2cpr4kkyyl"],"slugs":["squad-operations"],"dateCreated":"1406661174","dateModified":"1412256525"}},"slugMap":[],"cursor":{"limit":100,"after":null,"before":null}}}
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74] [2014-10-06 10:09:46] ERROR 2: Invalid argument supplied for foreach() at [/home/web/sites/phabricator/phabricator/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php:99]
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74]   #0 ProjectQueryConduitAPIMethod::execute(ConduitAPIRequest) called at [<phabricator>/src/applications/conduit/method/ConduitAPIMethod.php:65]
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74]   #1 ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phabricator>/src/applications/conduit/call/ConduitCall.php:163]
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74]   #2 ConduitCall::executeMethod() called at [<phabricator>/src/applications/conduit/call/ConduitCall.php:90]
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74]   #3 ConduitCall::execute() called at [<phabricator>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:88]
[Mon Oct 06 10:09:46 2014] [error] [client 10.2.1.74]   #4 PhabricatorConduitAPIController::processRequest() called at [<phabricator>/webroot/index.php:101]