mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
Fix an issue with ConduitQueryConduitAPIMethod
Fixes an issue with D9991. A user was hitting the following exception: ``` echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit conduit.query Waiting for JSON parameters on stdin... Exception [HTTP/500] Internal Server Error >>> UNRECOVERABLE FATAL ERROR <<< Call to a member function getAPIMethodName() on a non-object /usr/src/phabricator/src/applications/conduit/method/ConduitQueryConduitAPIMethod.php:34 ┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻ (Run with --trace for a full exception trace.) ``` Auditors: epriestley
This commit is contained in:
parent
da49ae8fe2
commit
8ce35e6b67
1 changed files with 5 additions and 5 deletions
|
@ -27,15 +27,15 @@ final class ConduitQueryConduitAPIMethod extends ConduitAPIMethod {
|
|||
->setAncestorClass('ConduitAPIMethod')
|
||||
->setType('class')
|
||||
->setConcreteOnly(true)
|
||||
->selectSymbolsWithoutLoading();
|
||||
->loadObjects();
|
||||
|
||||
$names_to_params = array();
|
||||
foreach ($classes as $class) {
|
||||
$method_name = $class['name'];
|
||||
$obj = newv($method_name, array());
|
||||
$names_to_params[$this->getAPIMethodNameFromClassName($method_name)] =
|
||||
array('params' => $obj->defineParamTypes());
|
||||
$names_to_params[$class->getAPIMethodName()] = array(
|
||||
'params' => $class->defineParamTypes(),
|
||||
);
|
||||
}
|
||||
|
||||
return $names_to_params;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue