From 2beb4fc172c921245c237c4c1714d170fd8df8b7 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 16 Sep 2014 02:58:36 -0400 Subject: [PATCH] When cloning TextContent, include model The model id should be preserved when cloning values on save. Change-Id: I397d36af30cf1401023b761e8c41f0dc83e76c12 --- includes/content/TextContent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index d292880ba4..c479f202fb 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -160,7 +160,7 @@ class TextContent extends AbstractContent { $text = $this->getNativeData(); $pst = rtrim( $text ); - return ( $text === $pst ) ? $this : new static( $pst ); + return ( $text === $pst ) ? $this : new static( $pst, $this->getModel() ); } /** -- 2.20.1