From b51ae8f32d9d8e0f1ae3f773ca216748906b8b0d Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Fri, 5 Sep 2014 10:48:23 -0700 Subject: [PATCH] Phriction - fix edits with subscribers Summary: pre-patch, these fatal, since we overwrite $content to be just a string so methods fail later in the code. Instead, write a $content_str to keep $content as the proper data. Test Plan: editing a document and on save it showed me the view page! (as opposed to fataling and staying on the eidt page) Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10426 --- src/applications/phriction/editor/PhrictionDocumentEditor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/phriction/editor/PhrictionDocumentEditor.php b/src/applications/phriction/editor/PhrictionDocumentEditor.php index 988c5dcbe9..89321b3c95 100644 --- a/src/applications/phriction/editor/PhrictionDocumentEditor.php +++ b/src/applications/phriction/editor/PhrictionDocumentEditor.php @@ -264,7 +264,7 @@ final class PhrictionDocumentEditor extends PhabricatorEditor { } if ($feed_action) { - $content = id(new PhutilUTF8StringTruncator()) + $content_str = id(new PhutilUTF8StringTruncator()) ->setMaximumGlyphs(140) ->truncateString($new_content->getContent()); id(new PhabricatorFeedStoryPublisher()) @@ -276,7 +276,7 @@ final class PhrictionDocumentEditor extends PhabricatorEditor { array( 'phid' => $document->getPHID(), 'action' => $feed_action, - 'content' => $content, + 'content' => $content_str, 'project' => $project_phid, 'movedFromPHID' => $this->fromDocumentPHID, ))