Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -5122,6 +5122,10 @@ |
5123 | 5123 | */ |
5124 | 5124 | function disableCache() { |
5125 | 5125 | wfDebug( "Parser output marked as uncacheable.\n" ); |
| 5126 | + if ( !$this->mOutput ) { |
| 5127 | + throw new MWException( __METHOD__ . |
| 5128 | + " can only be called when actually parsing something" ); |
| 5129 | + } |
5126 | 5130 | $this->mOutput->setCacheTime( -1 ); // old style, for compatibility |
5127 | 5131 | $this->mOutput->updateCacheExpiry( 0 ); // new style, for consistency |
5128 | 5132 | } |