// bug 44570: the core page itself may not change, but resources might
$modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $config->get( 'SquidMaxage' ) );
}
- Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes ] );
+ Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
$maxModified = max( $modifiedTimes );
$this->mLastModified = wfTimestamp( TS_RFC2822, $maxModified );
// adding of CSS or Javascript by extensions.
Hooks::run( 'BeforePageDisplay', [ &$this, &$sk ] );
- $sk->outputPage();
+ try {
+ $sk->outputPage();
+ } catch ( Exception $e ) {
+ ob_end_clean(); // bug T129657
+ throw $e;
+ }
}
- // This hook allows last minute changes to final overall output by modifying output buffer
- Hooks::run( 'AfterFinalPageOutput', [ $this ] );
+ try {
+ // This hook allows last minute changes to final overall output by modifying output buffer
+ Hooks::run( 'AfterFinalPageOutput', [ $this ] );
+ } catch ( Exception $e ) {
+ ob_end_clean(); // bug T129657
+ throw $e;
+ }
$this->sendCacheControl();