r77748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77747‎ | r77748 | r77749 >
Date:23:36, 4 December 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Revert r70202. Replace with an exception.
Modified paths:
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserCache.php
@@ -32,8 +32,7 @@
3333 */
3434 function __construct( $memCached ) {
3535 if ( !$memCached ) {
36 - global $parserMemc;
37 - $parserMemc = $memCached = wfGetParserCacheStorage();
 36+ throw MWException( "Tried to create a ParserCache with an invalid memcached" );
3837 }
3938 $this->mMemc = $memCached;
4039 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r77752Followup r77748, throw NEW MWExceptionreedy00:37, 5 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70202Make sure we get a good memCached object.mah19:51, 30 July 2010

Comments

#Comment by Reedy (talk | contribs)   00:35, 5 December 2010

http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw

PHP Fatal error: Call to undefined function MWException() in /home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/parser/ParserCache.php on line 35

#Comment by MaxSem (talk | contribs)   11:18, 5 December 2010

Broke unit tests.

#Comment by Reedy (talk | contribs)   14:03, 5 December 2010

Interestingly, it doesn't on my (or Platonides) setup

But it does on Tesla, hence bug 26244

#Comment by Platonides (talk | contribs)   22:35, 11 December 2010

Fixed in r78009

#Comment by Nikerabbit (talk | contribs)   13:02, 5 December 2010

Why not do the same what MessageCache does?

               if ( !$memCached ) {
                       $memCached = wfGetCache( CACHE_NONE );
               }

Those who are not interested about caching can pass null or false to the constructor.

Status & tagging log