Use new static instead of new self
authorKunal Mehta <legoktm@gmail.com>
Sat, 9 Aug 2014 13:15:46 +0000 (14:15 +0100)
committerReedy <reedy@wikimedia.org>
Sat, 9 Aug 2014 13:18:05 +0000 (13:18 +0000)
See code review on I957d6bda626b8e749a99717b5c89c4db38a36bf8

Change-Id: I79e4a987636509515df044da7a6951d3e4b4f824

includes/content/JSONContent.php

index f55467f..377d675 100644 (file)
@@ -55,7 +55,7 @@ class JSONContent extends TextContent {
         * @return JSONContent
         */
        public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) {
-               return new self( $this->beautifyJSON() );
+               return new static( $this->beautifyJSON() );
        }
 
        /**