Fixed fatal error when HTTP request is pre–filtered.
This commit is contained in:
1 parent
d724958dec
commit
7cbbc2041f
3 files changed
+9
-4
No files matched your search
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 3.0.1 - 2019-01-09
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- fatal error when HTTP request is pre–filtered
|
||||||
|
|
||||||
## 3.0 - 2018-12-28
|
## 3.0 - 2018-12-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Plugin Name: Laps
|
|||||||
Plugin URI: https://github.com/Rarst/laps
|
Plugin URI: https://github.com/Rarst/laps
|
||||||
Description: Light WordPress profiler.
|
Description: Light WordPress profiler.
|
||||||
Author: Andrey “Rarst” Savchenko
|
Author: Andrey “Rarst” Savchenko
|
||||||
Version: 3.0
|
Version: 3.0.1
|
||||||
Author URI: https://www.rarst.net/
|
Author URI: https://www.rarst.net/
|
||||||
Text Domain: laps
|
Text Domain: laps
|
||||||
Domain Path: /lang
|
Domain Path: /lang
|
||||||
|
|||||||
@@ -35,16 +35,16 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
/**
|
/**
|
||||||
* Capture start time of HTTP request
|
* Capture start time of HTTP request
|
||||||
*
|
*
|
||||||
* @param boolean $false Whether to preempt an HTTP request's return value. Default false.
|
* @param false|array|\WP_Error $false Whether to preempt an HTTP request's return value. Default false.
|
||||||
* @param array $args HTTP request arguments.
|
* @param array $args HTTP request arguments.
|
||||||
* @param string $url The request URL.
|
* @param string $url The request URL.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @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->start( $url, 'http' );
|
||||||
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5, true );
|
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );
|
||||||
|
|
||||||
return $false;
|
return $false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user