Page MenuHomePhabricator

PHP Notice: Undefined property: stdClass::$newContent in includes/page/WikiPage.php
Closed, ResolvedPublicPRODUCTION ERROR

Description

Nov 15 18:34:47 mw1029: #012Notice: Undefined property: stdClass::$newContent in /srv/mediawiki/php-1.25wmf7/includes/page/WikiPage.php on line 2095

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:46 AM
bzimport set Reference to bz73474.
bzimport added a subscriber: Unknown Object (MLST).

This makes no sense. The only place that we set mPreparedEdit (other than to false, which is checked in this case) also sets ->newContent on it...

That said...

krenair@tin:/srv/mediawiki-staging/php-1.25wmf21$ grep "mPreparedEdit =" extensions/* -R
extensions/FlaggedRevs/backend/FlaggableWikiPage.php:		$this->mPreparedEdit = $page->mPreparedEdit;
krenair@tin:/srv/mediawiki-staging/php-1.25wmf21$
demon raised the priority of this task from Medium to High.Jun 11 2015, 4:30 PM
demon added subscribers: demon, aaron.
demon lowered the priority of this task from High to Medium.Jun 11 2015, 4:38 PM
Krinkle renamed this task from PHP notice in hhvm.log: Undefined property: stdClass::$newContent in includes/page/WikiPage.php to PHP Notice: Undefined property: stdClass::$newContent in includes/page/WikiPage.php.Nov 14 2015, 2:03 AM
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.
Krinkle removed a subscriber: wikibugs-l-list.

Notice: Undefined property: stdClass::$newContent in /srv/mediawiki/php-1.27.0-wmf.6/includes/page/WikiPage.php on line 2067

Still happen regularly (13x in the last hour).

Yep, still happening...

Undefined property: stdClass::$newContent in /srv/mediawiki/php-1.27.0-wmf.7/includes/page/WikiPage.php on line 2067

Change 301636 had a related patch set uploaded (by Addshore):
Use isset in WikiPage prepareContentForEdit for newContent

https://gerrit.wikimedia.org/r/301636

Change 301636 merged by jenkins-bot:
Use isset in WikiPage prepareContentForEdit for newContent

https://gerrit.wikimedia.org/r/301636

Addshore claimed this task.
Addshore subscribed.

Should now be fixed.

I don't think sprinkling isset is a good approach in the long run.

I don't think sprinkling isset is a good approach in the long run.

That looks like the exact intention of the check.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM