Throw an exception if Parser::disableCache is called before mOutput initialized ...
authorBrian Wolff <bawolff@users.mediawiki.org>
Thu, 15 Dec 2011 07:17:29 +0000 (07:17 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Thu, 15 Dec 2011 07:17:29 +0000 (07:17 +0000)
commit4df8e9d5958e3d3415a15a9d92763aa2cd6ab940
tree8dad26191613ca6482591838a1ab1ba8948534d3
parentf12c373d1eeb18c502abf46e343d0bda5d87dd2f
Throw an exception if Parser::disableCache is called before mOutput initialized (Aka when not parsing something).

So far I've encountered 2 extensions that give fatal errors from calling $wgParser->disableOutput() from hooks that are called at points where parsing is not taking place! Exception with a backtrace is much nicer than "Fatal error: Call to a member function disableCache() on a non-object..."
includes/parser/Parser.php