X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fparser%2FParserCache.php;h=43c72b18f85af88ec923d0a6291155137fe6b113;hb=ad04e28eec274e71656e6f58a9b387a347de14f8;hp=5e6081d33d9bb6bd3fa01aa58f890c7fc314a288;hpb=be74c82f9a19f9fc5a0c771ec627b9aa9746089e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 5e6081d33d..43c72b18f8 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -301,6 +301,10 @@ class ParserCache { $cacheTime = null, $revId = null ) { + if ( !$parserOutput->hasText() ) { + throw new InvalidArgumentException( 'Attempt to cache a ParserOutput with no text set!' ); + } + $expire = $parserOutput->getCacheExpiry(); if ( $expire > 0 && !$this->mMemc instanceof EmptyBagOStuff ) { $cacheTime = $cacheTime ?: wfTimestampNow();