diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 51ed2adba8..e32fe92983 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -244,7 +244,12 @@ abstract class PhabricatorApplicationTransaction ->setNewValue($new_value); } - $metadata = $this->getMetadataValue('remarkup.control', array()); + $metadata = $this->getMetadataValue('remarkup.control'); + + if (!is_array($metadata)) { + $metadata = array(); + } + foreach ($changes as $change) { if (!$change->getMetadata()) { $change->setMetadata($metadata); diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index caf1ce5183..2e469c5e0a 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php @@ -325,6 +325,10 @@ final class PhabricatorApplicationTransactionCommentView } $remarkup_control->setValue($draft_comment); + + if (!is_array($draft_metadata)) { + $draft_metadata = array(); + } $remarkup_control->setRemarkupMetadata($draft_metadata); if (!$this->getObjectPHID()) {