if ( $ret === null || !$ret->isSpecialPage() ) {
// We can have urls with just ?diff=,?oldid= or even just ?diff=
$oldid = $request->getInt( 'oldid' );
- $oldid = $oldid ? $oldid : $request->getInt( 'diff' );
+ $oldid = $oldid ?: $request->getInt( 'diff' );
// Allow oldid to override a changed or missing title
if ( $oldid ) {
$rev = Revision::newFromId( $oldid );
// If $target is set, then a hook wanted to redirect.
if ( !$ignoreRedirect && ( $target || $page->isRedirect() ) ) {
// Is the target already set by an extension?
- $target = $target ? $target : $page->followRedirect();
+ $target = $target ?: $page->followRedirect();
if ( is_string( $target ) ) {
if ( !$this->config->get( 'DisableHardRedirects' ) ) {
// we'll need to redirect
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
}
+ // Disable WebResponse setters for post-send processing (T191537).
+ WebResponse::disableForPostSend();
+
$blocksHttpClient = true;
// Defer everything else if possible...
$callback = function () use ( $mode, &$blocksHttpClient ) {