From: Mikael Nordfeldth Date: Wed, 27 Jan 2016 21:41:53 +0000 (+0100) Subject: Don't add space if there's no string in new notice content X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a47563cf3d2a45cd3f80ea8cefad6ceae9cf4a62;p=quix0rs-gnu-social.git Don't add space if there's no string in new notice content --- diff --git a/actions/newnotice.php b/actions/newnotice.php index 4abcb3192f..16ca3bb999 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -104,7 +104,7 @@ class NewnoticeAction extends FormAction // throws exception on failure $upload = MediaFile::fromUpload('attach', $this->scoped); if (Event::handle('StartSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options))) { - $content .= ' ' . $upload->shortUrl(); + $content = ($content==='' ? '' : ' ') . $upload->shortUrl(); } Event::handle('EndSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options));