Merge pull request #29 from runcommand/hook-count

Count all hook calls, regardless of whether we're in a current hook
This commit is contained in:
Daniel Bachhuber 2016-08-26 09:21:48 -07:00 committed by GitHub
commit 68d3dc4c02

View file

@ -92,11 +92,11 @@ class Logger {
* Start this logger's hook timer
*/
public function start_hook_timer() {
$this->hooks['count']++;
// Timer already running means a subhook has been called
if ( ! is_null( $this->hook_start_time ) ) {
$this->hook_depth++;
} else {
$this->hooks['count']++;
$this->hook_start_time = microtime( true );
}
}