Skip to content

Commit b601c03

Browse files
Copilotswissspidy
andcommitted
Fix http_api_debug hook registration to pass all 5 parameters
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 2f5632b commit b601c03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Profiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function () {
131131
WP_CLI::add_wp_hook( 'all', array( $this, 'wp_hook_begin' ) );
132132
}
133133
WP_CLI::add_wp_hook( 'pre_http_request', array( $this, 'wp_request_begin' ), 10, 3 );
134-
WP_CLI::add_wp_hook( 'http_api_debug', array( $this, 'wp_request_end' ) );
134+
WP_CLI::add_wp_hook( 'http_api_debug', array( $this, 'wp_request_end' ), 10, 5 );
135135
$this->load_wordpress_with_template();
136136
}
137137

@@ -409,7 +409,7 @@ public function wp_request_begin( $preempt = null, $parsed_args = null, $url = n
409409
/**
410410
* Profiling request time for any active Loggers
411411
*/
412-
public function wp_request_end( $response = null ) {
412+
public function wp_request_end( $response = null, $context = null, $class = null, $parsed_args = null, $url = null ) {
413413
foreach ( Logger::$active_loggers as $logger ) {
414414
$logger->stop_request_timer();
415415
}

0 commit comments

Comments
 (0)