r87680 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87679‎ | r87680 | r87681 >
Date:08:50, 8 May 2011
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
$wgOut can no longer be a stub since r85278, so there's no need to check this with StubObject::isRealObject()
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -192,7 +192,7 @@
193193 if ( ( $wgDebugComments || $wgShowDebug ) && !$logonly ) {
194194 $cache[] = $text;
195195
196 - if ( isset( $wgOut ) && StubObject::isRealObject( $wgOut ) ) {
 196+ if ( isset( $wgOut ) && is_object( $wgOut ) ) {
197197 // add the message and any cached messages to the output
198198 array_map( array( $wgOut, 'debug' ), $cache );
199199 $cache = array();

Follow-up revisions

RevisionCommit summaryAuthorDate
r88653Per comment on r87680: make parser tests work again....ialex17:22, 23 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85278Follow-up to r85240:...happy-melon20:40, 3 April 2011

Comments

#Comment by Bawolff (talk | contribs)   16:58, 23 May 2011

Breaks parser tests if you have the debug comments option enabled:

bawolff@Bawolff-L:/var/www/w/phase3$ php tests/parserTests.php 
Warning: array_map(): An error occurred while invoking the map callback in /var/www/w/phase3/includes/GlobalFunctions.php on line 338
Warning: array_map(): An error occurred while invoking the map callback in /var/www/w/phase3/includes/GlobalFunctions.php on line 338
Warning: array_map(): An error occurred while invoking the map callback in /var/www/w/phase3/includes/GlobalFunctions.php on line 338
Unstub loop detected on call of $wgOut->debug from array_map

Backtrace:
#0 /var/www/w/phase3/includes/StubObject.php(57): StubObject->_unstub('debug', 5)
#1 /var/www/w/phase3/includes/StubObject.php(76): StubObject->_call('debug', Array)
#2 [internal function]: StubObject->__call('debug', Array)
#3 [internal function]: StubObject->debug('Unstubbing $wgL...')
#4 /var/www/w/phase3/includes/GlobalFunctions.php(338): array_map(Array, Array)
#5 /var/www/w/phase3/includes/StubObject.php(102): wfDebug('Unstubbing $wgO...')
#6 /var/www/w/phase3/includes/StubObject.php(57): StubObject->_unstub('debug', 5)
#7 /var/www/w/phase3/includes/StubObject.php(76): StubObject->_call('debug', Array)
#8 [internal function]: StubObject->__call('debug', Array)
#9 [internal function]: StubObject->debug('Unstubbing $wgL...')
#10 /var/www/w/phase3/includes/GlobalFunctions.php(338): array_map(Array, Array)
#11 /var/www/w/phase3/includes/StubObject.php(102): wfDebug('Unstubbing $wgO...')
#12 /var/www/w/phase3/includes/StubObject.php(57): StubObject->_unstub('debug', 5)
#13 /var/www/w/phase3/includes/StubObject.php(76): StubObject->_call('debug', Array)
#14 [internal function]: StubObject->__call('debug', Array)
#15 [internal function]: StubObject->debug('Unstubbing $wgL...')
#16 /var/www/w/phase3/includes/GlobalFunctions.php(338): array_map(Array, Array)
#17 /var/www/w/phase3/includes/StubObject.php(102): wfDebug('Unstubbing $wgL...')
#18 /var/www/w/phase3/includes/StubObject.php(57): StubObject->_unstub('getCode', 5)
#19 /var/www/w/phase3/includes/StubObject.php(147): StubObject->_call('getCode', Array)
#20 /var/www/w/phase3/includes/cache/MessageCache.php(595): StubUserLang->__call('getCode', Array)
#21 /var/www/w/phase3/includes/cache/MessageCache.php(595): StubUserLang->getCode()
#22 /var/www/w/phase3/includes/GlobalFunctions.php(835): MessageCache->get('version-svn-rev...', true, false)
#23 /var/www/w/phase3/includes/GlobalFunctions.php(799): wfMsgGetKey('version-svn-rev...', true, false, true)
#24 /var/www/w/phase3/includes/GlobalFunctions.php(685): wfMsgReal('version-svn-rev...', Array, true)
#25 /var/www/w/phase3/includes/specials/SpecialVersion.php(176): wfMsg('version-svn-rev...', 88648, 88648)
#26 /var/www/w/phase3/tests/parserTests.php(84): SpecialVersion::getVersion()
#27 {main}

Status & tagging log