From 1fcdcddd5f2bf33a9ecf4ee163639df81142fe58 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 5 Dec 2015 09:12:23 -0800 Subject: [PATCH] Fix EditEngine preview/draft for first comment on a task you didn't create Summary: Ref T9132. See T9908#147038. Test Plan: - As user A, created a new task. - As user B, started typing a comment on it (with no prior activity). - Users A and B must be different. Before patch: preview/draft don't work, trace in error log (see above). After patch: preview/draft work. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9132 Differential Revision: https://secure.phabricator.com/D14678 --- src/applications/draft/storage/PhabricatorVersionedDraft.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/draft/storage/PhabricatorVersionedDraft.php b/src/applications/draft/storage/PhabricatorVersionedDraft.php index 145f24a3fb..2840a4249c 100644 --- a/src/applications/draft/storage/PhabricatorVersionedDraft.php +++ b/src/applications/draft/storage/PhabricatorVersionedDraft.php @@ -58,7 +58,7 @@ final class PhabricatorVersionedDraft extends PhabricatorDraftDAO { return id(new PhabricatorVersionedDraft()) ->setObjectPHID($object_phid) ->setAuthorPHID($viewer_phid) - ->setVersion($version) + ->setVersion((int)$version) ->save(); }