r24932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24931‎ | r24932 | r24933 >
Date:07:42, 20 August 2007
Author:nickj
Status:old
Tags:
Comment:
Prevent E_STRICT warning:
"Trying to get property of non-object in includes/PageHistory.php on line 257"
Happens because $next === 'unknown', i.e. not an object, on one revision for me with the following fuzz command line test on a local test wiki:

curl --silent --include --globoff -F 'offset'='&#x0003C;<u ' -F 'dir'='prev' 'http://localhost/wiki/index.php?title=Main_Page&amp;action=history' | less
Modified paths:
  • /trunk/phase3/includes/PageHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PageHistory.php
@@ -248,7 +248,7 @@
249249
250250 $tools = array();
251251
252 - if ( !is_null( $next ) ) {
 252+ if ( !is_null( $next ) && is_object( $next ) ) {
253253 if( $wgUser->isAllowed( 'rollback' ) && $latest ) {
254254 $tools[] = '<span class="mw-rollback-link">'
255255 . $this->mSkin->buildRollbackLink( $rev )

Follow-up revisions

RevisionCommit summaryAuthorDate
r25016Merged revisions 24866-25015 via svnmerge from...david23:06, 21 August 2007

Status & tagging log