diff --git a/src/Core/Post/DiscussionRenamedPost.php b/src/Core/Post/DiscussionRenamedPost.php index 29cec3264..fd34e7402 100755 --- a/src/Core/Post/DiscussionRenamedPost.php +++ b/src/Core/Post/DiscussionRenamedPost.php @@ -28,7 +28,7 @@ class DiscussionRenamedPost extends AbstractEventPost implements MergeableInterf /** * {@inheritdoc} */ - public function saveAfter(Post $previous) + public function saveAfter(Post $previous = null) { // If the previous post is another 'discussion renamed' post, and it's // by the same user, then we can merge this post into it. If we find diff --git a/src/Core/Post/MergeableInterface.php b/src/Core/Post/MergeableInterface.php index 4feca3e66..0e84d3a23 100644 --- a/src/Core/Post/MergeableInterface.php +++ b/src/Core/Post/MergeableInterface.php @@ -25,10 +25,10 @@ interface MergeableInterface * Save the model, given that it is going to appear immediately after the * passed model. * - * @param Post $previous + * @param Post|null $previous * @return Post The model resulting after the merge. If the merge is * unsuccessful, this should be the current model instance. Otherwise, * it should be the model that was merged into. */ - public function saveAfter(Post $previous); + public function saveAfter(Post $previous = null); }