Use isset in WikiPage prepareContentForEdit for newContent
authoraddshore <addshorewiki@gmail.com>
Thu, 28 Jul 2016 16:22:05 +0000 (17:22 +0100)
committerAddshore <addshorewiki@gmail.com>
Thu, 28 Jul 2016 16:25:49 +0000 (16:25 +0000)
This will stop the following:

Undefined property: stdClass::$newContent in
includes/page/WikiPage.php on line 2056

Bug: T75474
Change-Id: I1bc840faff1b4dc1444434b4edec223950bc6eb1

includes/page/WikiPage.php

index e7352af..46fef10 100644 (file)
@@ -2050,7 +2050,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( $this->mPreparedEdit
-                       && $this->mPreparedEdit->newContent
+                       && isset( $this->mPreparedEdit->newContent )
                        && $this->mPreparedEdit->newContent->equals( $content )
                        && $this->mPreparedEdit->revid == $revid
                        && $this->mPreparedEdit->format == $serialFormat