From 0d9362355b1e657b5844d3cb887b29213eb01485 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 29 Apr 2019 07:33:53 -0700 Subject: [PATCH] In ApplicationTransactionEditor, determine new objects with "getID()" instead of "getPHID()" Summary: See . When editing "Config" objects, they currently get a PHID set outside of the TransactionEditor. They probably should not, but fixing that is likely an involved change. This causes us to incorrectly fail to detect `$is_new` correctly and try to `reload()` and object with no ID. To work around this, test for new objects with `getID()` instead of `getPHID()`. Test Plan: Edited any config value with the web UI. Reviewers: amckinley Differential Revision: https://secure.phabricator.com/D20482 --- .../editor/PhabricatorApplicationTransactionEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index 882f10752a..f622e0a21d 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -977,7 +977,7 @@ abstract class PhabricatorApplicationTransactionEditor PhabricatorLiskDAO $object, array $xactions) { - $is_new = ($object->getPHID() === null); + $is_new = ($object->getID() === null); $this->isNewObject = $is_new; $is_preview = $this->getIsPreview();