Prepare for REL1_32 cut, labelling master as 1.33-alpha
[lhc/web/wiklou.git] / includes / parser / ParserCache.php
index 5e6081d..43c72b1 100644 (file)
@@ -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();