From 7e3d8082dfc521437bd5c9a623fe1bea516ed0ef Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Nov 2015 10:49:39 -0800 Subject: [PATCH] Fix missing EditEngineConfig on indirect pathway through conduit.query Summary: Fixes T9772. We now need an EditEngineConfiguration to do interesting things with EditEngine, but this public API wasn't properly making sure we have one. Test Plan: Called `conduit.query` from web console. Fatal prior to patch; success afterward. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9772 Differential Revision: https://secure.phabricator.com/D14475 --- .../transactions/editengine/PhabricatorEditEngine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 3fca734330..3137a7d8bc 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -961,6 +961,11 @@ abstract class PhabricatorEditEngine } public function getAllEditTypes() { + $config = $this->loadEditEngineConfiguration(null); + if (!$config) { + return array(); + } + $object = $this->newEditableObject(); $fields = $this->buildEditFields($object); return $this->getAllEditTypesFromFields($fields);