From 1965b78b34f1946ca03063b17a1584865a272dbd Mon Sep 17 00:00:00 2001 From: Dmitri Iouchtchenko Date: Fri, 20 Aug 2021 18:48:20 -0400 Subject: [PATCH] Fix subtype extension support check Summary: Fixes T13663. `supportsSubtypes` tries to create an editable object, but this isn't always valid for `PhabricatorCalendarImport`. Use `instanceof` instead. Test Plan: - Edited calendar import, tasks (2 different subtypes), and projects (2 different subtypes). - Changed task subtypes using {nav Change Subtype} action and batch editor. - Changed task and project subtypes using Conduit. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Maniphest Tasks: T13663 Differential Revision: https://secure.phabricator.com/D21714 --- .../engineextension/PhabricatorSubtypeEditEngineExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php index e73d476d74..3a301d8410 100644 --- a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php +++ b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php @@ -21,7 +21,7 @@ final class PhabricatorSubtypeEditEngineExtension public function supportsObject( PhabricatorEditEngine $engine, PhabricatorApplicationTransactionInterface $object) { - return $engine->supportsSubtypes(); + return ($object instanceof PhabricatorEditEngineSubtypeInterface); } public function buildCustomEditFields(