Page MenuHomePhabricator

PHP Fatal error: Call to a member function getParserOutput() on a non-object in FlaggedRevs.class.php on line 575
Closed, DeclinedPublic

Description

[08-Oct-2013 18:24:10] Fatal error: Call to a member function getParserOutput() on a non-object at /usr/local/apache/common-local/php-1.22wmf19/extensions/FlaggedRevs/backend/FlaggedRevs.class.php on line 575
Server: mw1028
Method: GET
URL: http://pl.wikipedia.org/wiki/Nie_mam_nic,_prócz_Ciebie_(Lady)
Backtrace:
#0 /usr/local/apache/common-local/php-1.22wmf19/extensions/FlaggedRevs/backend/FlaggedRevs.class.php(575): FlaggedRevs::parseStableRevision()
#1 /usr/local/apache/common-local/php-1.22wmf19/extensions/FlaggedRevs/frontend/FlaggablePageView.php(697): FlaggedRevs::parseStableRevision(Object(FlaggedRevision), Object(ParserOptions))
#2 /usr/local/apache/common-local/php-1.22wmf19/extensions/FlaggedRevs/frontend/FlaggablePageView.php(354): FlaggablePageView->showStableVersion(Object(FlaggedRevision), '', '')
#3 /usr/local/apache/common-local/php-1.22wmf19/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php(194): FlaggablePageView->setPageContent(false, true)
#4 [internal function]: FlaggedRevsUIHooks::onArticleViewHeader(Object(Article), false, true)
#5 /usr/local/apache/common-local/php-1.22wmf19/includes/Hooks.php(199): call_user_func_array('FlaggedRevsUIHo...', Array)
#6 /usr/local/apache/common-local/php-1.22wmf19/includes/GlobalFunctions.php(3898): Hooks::run('ArticleViewHead...', Array)
#7 /usr/local/apache/common-local/php-1.22wmf19/includes/Article.php(615): wfRunHooks('ArticleViewHead...', Array)
#8 /usr/local/apache/common-local/php-1.22wmf19/includes/actions/ViewAction.php(44): Article->view()
#9 /usr/local/apache/common-local/php-1.22wmf19/includes/Wiki.php(441): ViewAction->show()
#10 /usr/local/apache/common-local/php-1.22wmf19/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#11 /usr/local/apache/common-local/php-1.22wmf19/includes/Wiki.php(591): MediaWiki->performRequest()
#12 /usr/local/apache/common-local/php-1.22wmf19/includes/Wiki.php(460): MediaWiki->main()
#13 /usr/local/apache/common-local/php-1.22wmf19/index.php(55): MediaWiki->run()
#14 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#15 {main}


Version: unspecified
Severity: normal

Details

Reference
bz55471

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:16 AM
bzimport set Reference to bz55471.
bzimport added a subscriber: Unknown Object (MLST).

aaron@terbium:~$ mwscript eval.php plwiki

$rev = Revision::newFromId( 16265152 );

var_dump( $rev->getContent() );

NULL

var_dump( $rev->getText() );

string(0) ""

var_dump( $rev->getSha1() );

string(0) ""

This is a case of a broken revision from 2009.

Revision::getContent is documented to return null,
so FlaggedRevs should not get a fatal here.

Same bug, lines have moved a bit...

[18-Dec-2013 03:32:00] Fatal error: Call to a member function getParserOutput() on a non-object at /usr/local/apache/common-local/php-1.23wmf6/extensions/FlaggedRevs/backend/FlaggedRevs.class.php on line 541
Server: mw1065
Method: GET
URL: http://pl.wikipedia.org/wiki/Nie_mam_nic,_prócz_Ciebie_(Lady)
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf6/extensions/FlaggedRevs/backend/FlaggedRevs.class.php(541): FlaggedRevs::parseStableRevision()
#1 /usr/local/apache/common-local/php-1.23wmf6/extensions/FlaggedRevs/frontend/FlaggablePageView.php(701): FlaggedRevs::parseStableRevision(Object(FlaggedRevision), Object(ParserOptions))
#2 /usr/local/apache/common-local/php-1.23wmf6/extensions/FlaggedRevs/frontend/FlaggablePageView.php(354): FlaggablePageView->showStableVersion(Object(FlaggedRevision), '', '')
#3 /usr/local/apache/common-local/php-1.23wmf6/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php(194): FlaggablePageView->setPageContent(false, true)
#4 [internal function]: FlaggedRevsUIHooks::onArticleViewHeader(Object(Article), false, true)
#5 /usr/local/apache/common-local/php-1.23wmf6/includes/Hooks.php(199): call_user_func_array('FlaggedRevsUIHo...', Array)
#6 /usr/local/apache/common-local/php-1.23wmf6/includes/GlobalFunctions.php(4031): Hooks::run('ArticleViewHead...', Array)
#7 /usr/local/apache/common-local/php-1.23wmf6/includes/Article.php(615): wfRunHooks('ArticleViewHead...', Array)
#8 /usr/local/apache/common-local/php-1.23wmf6/includes/actions/ViewAction.php(44): Article->view()
#9 /usr/local/apache/common-local/php-1.23wmf6/includes/Wiki.php(441): ViewAction->show()
#10 /usr/local/apache/common-local/php-1.23wmf6/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#11 /usr/local/apache/common-local/php-1.23wmf6/includes/Wiki.php(596): MediaWiki->performRequest()
#12 /usr/local/apache/common-local/php-1.23wmf6/includes/Wiki.php(460): MediaWiki->main()
#13 /usr/local/apache/common-local/php-1.23wmf6/index.php(49): MediaWiki->run()
#14 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#15 {main}

var_dump( $rev );

object(Revision)#94 (23) {

["mId":protected]=>
int(16265152)
["mPage":protected]=>
int(1631229)
["mUserText":protected]=>
string(2) "PG"
["mOrigUserText":protected]=>
string(2) "PG"
["mUser":protected]=>
int(34372)
["mMinorEdit":protected]=>
int(0)
["mTimestamp":protected]=>
string(14) "20090309205942"
["mDeleted":protected]=>
int(0)
["mSize":protected]=>
int(42)
["mSha1":protected]=>
string(0) ""
["mParentId":protected]=>
int(0)
["mComment":protected]=>
string(91) "[[Nie mam nic, prócz Ciebie (Lady)]] przeniesiono do [[Nie mam nic, prócz ciebie (lady)]]"
["mText":protected]=>
NULL
["mTextRow":protected]=>
NULL
["mTitle":protected]=>
object(Title)#95 (28) {
  ["mTextform"]=>
  string(33) "Nie mam nic, prócz Ciebie (Lady)"
  ["mUrlform"]=>
  string(37) "Nie_mam_nic,_pr%C3%B3cz_Ciebie_(Lady)"
  ["mDbkeyform"]=>
  string(33) "Nie_mam_nic,_prócz_Ciebie_(Lady)"
  ["mUserCaseDBKey"]=>
  NULL
  ["mNamespace"]=>
  int(0)
  ["mInterwiki"]=>
  string(0) ""
  ["mFragment"]=>
  string(0) ""
  ["mArticleID"]=>
  int(1631229)
  ["mLatestID"]=>
  int(16265152)
  ["mContentModel"]=>
  bool(false)
  ["mEstimateRevisions":"Title":private]=>
  NULL
  ["mRestrictions"]=>
  array(0) {
  }
  ["mOldRestrictions"]=>
  bool(false)
  ["mCascadeRestriction"]=>
  NULL
  ["mCascadingRestrictions"]=>
  NULL
  ["mRestrictionsExpiry"]=>
  array(0) {
  }
  ["mHasCascadingRestrictions"]=>
  NULL
  ["mCascadeSources"]=>
  NULL
  ["mRestrictionsLoaded"]=>
  bool(false)
  ["mPrefixedText"]=>
  NULL
  ["mTitleProtection"]=>
  NULL
  ["mDefaultNamespace"]=>
  int(0)
  ["mWatched"]=>
  NULL
  ["mLength"]=>
  int(42)
  ["mRedirect"]=>
  bool(true)
  ["mNotificationTimestamp"]=>
  array(0) {
  }
  ["mHasSubpage"]=>
  NULL
  ["mPageLanguage":"Title":private]=>
  bool(false)
}
["mCurrent":protected]=>
bool(true)
["mContentModel":protected]=>
NULL
["mContentFormat":protected]=>
NULL
["mContent":protected]=>
NULL
["mContentHandler":protected]=>
NULL
["mQueryFlags":protected]=>
int(0)
["mTextId"]=>
int(16147892)
["mUnpatrolled"]=>
NULL

}

reedy@tin:~sqlhp plwiki

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1413380858
Server version: 5.5.30-MariaDB-mariadb1~precise-log mariadb.org binary distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql:wikiadmin@db1036 [plwiki]> select * from text where old_id = 16147892;
+----------+---------------+-----------+------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+

old_idold_namespaceold_titleold_textold_commentold_userold_user_textold_timestampold_minor_editold_flagsinverse_timestamp

+----------+---------------+-----------+------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+

161478920DB://cluster20/000utf-8,gzip,external

+----------+---------------+-----------+------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+
1 row in set (0.07 sec)

It really is a screwed up db row...

I fixed the old_text value, and it's still blank on the wiki. Page deleted...

  • Bug 52362 has been marked as a duplicate of this bug. ***