jenkins-bot has submitted this change and it was merged.
Change subject: Avoid double-rendering on late exceptions
......................................................................
Avoid double-rendering on late exceptions
Bug: T129657
Change-Id: I86af834b842bc056b57b2a55a9e1385481d5781d
---
M includes/OutputPage.php
1 file changed, 13 insertions(+), 3 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 6774072..cffa744 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2315,11 +2315,21 @@
// 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();
--
To view, visit https://gerrit.wikimedia.org/r/278339
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I86af834b842bc056b57b2a55a9e1385481d5781d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits