Page MenuHomePhabricator

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

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).
Reedy created this task.Nov 15 2014, 6:44 PM

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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 14 2015, 2:03 AM

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
mmodell raised the priority of this task from Medium to High.May 26 2016, 8:00 PM
Krinkle removed a subscriber: Krinkle.Jun 2 2016, 7:47 PM

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 closed this task as Resolved.Jul 28 2016, 4:40 PM
Addshore claimed this task.
Addshore added a subscriber: Addshore.

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.

Restricted Application added a project: User-Addshore. · View Herald TranscriptMar 19 2019, 3:46 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM