Skip to content

Commit

Permalink
Merge branch 'trunk' into add/phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz authored May 31, 2023
2 parents 93ec3dc + dcac3ba commit 789f317
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions server-timing/class-perflab-server-timing.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,11 @@ public function on_template_include( $passthrough = null ) {
return $passthrough;
}

ob_start();
add_action(
'shutdown',
function() {
$output = ob_get_clean();
ob_start(
function( $output ) {
$this->send_header();
echo $output;
},
// phpcs:ignore PHPCompatibility.Constants.NewConstants
defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : -1000
return $output;
}
);
return $passthrough;
}
Expand Down

0 comments on commit 789f317

Please sign in to comment.