Skip to content

Commit

Permalink
Fixed fatal error when HTTP request is pre–filtered.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rarst committed Jan 9, 2019
1 parent d724958 commit c1a389d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 3.0.1 - 2019-01-09

### Fixed
- fatal error when HTTP request is pre–filtered

## 3.0 - 2018-12-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion laps.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: https://github.com/Rarst/laps
Description: Light WordPress profiler.
Author: Andrey “Rarst” Savchenko
Version: 3.0
Version: 3.0.1
Author URI: https://www.rarst.net/
Text Domain: laps
Domain Path: /lang
Expand Down
10 changes: 5 additions & 5 deletions src/Record/Collector/Http_Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ public function __construct( Stopwatch $stopwatch ) {
/**
* Capture start time of HTTP request
*
* @param boolean $false Whether to preempt an HTTP request's return value. Default false.
* @param array $args HTTP request arguments.
* @param string $url The request URL.
* @param false|array|\WP_Error $false Whether to preempt an HTTP request's return value. Default false.
* @param array $args HTTP request arguments.
* @param string $url The request URL.
*
* @return boolean
*/
public function pre_http_request( bool $false, array $args, string $url ): bool {
public function pre_http_request( $false, array $args, string $url ) {

$this->start( $url, 'http' );
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5, true );
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );

return $false;
}
Expand Down

0 comments on commit c1a389d

Please sign in to comment.