Page MenuHomePhabricator

D18490.id44415.diff
No OneTemporary

D18490.id44415.diff

diff --git a/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php b/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
@@ -46,10 +46,12 @@
}
protected function validateAction($object, PhabricatorUser $viewer) {
- if ($this->getEditor()->getIsCloseByCommit()) {
- // If we're closing a revision because we discovered a commit, we don't
- // care what state it was in.
- return;
+ if ($this->hasEditor()) {
+ if ($this->getEditor()->getIsCloseByCommit()) {
+ // If we're closing a revision because we discovered a commit, we don't
+ // care what state it was in.
+ return;
+ }
}
if ($object->isClosed()) {
diff --git a/src/applications/transactions/storage/PhabricatorModularTransactionType.php b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
--- a/src/applications/transactions/storage/PhabricatorModularTransactionType.php
+++ b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
@@ -134,6 +134,10 @@
return $this->editor;
}
+ final protected function hasEditor() {
+ return (bool)$this->editor;
+ }
+
final protected function getAuthorPHID() {
return $this->getStorage()->getAuthorPHID();
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 1:40 AM (14 h, 37 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7015094
Default Alt Text
D18490.id44415.diff (1 KB)

Event Timeline