mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-18 06:11:20 +08:00
Fix PHP 7.2 incompatibility
This commit is contained in:
parent
d51a18884a
commit
3dc04e4e8a
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ class Logger {
|
|||
if ( ! is_null( $this->start_time ) ) {
|
||||
$this->time += microtime( true ) - $this->start_time;
|
||||
}
|
||||
if ( ! is_null( $this->query_offset ) && isset( $wpdb ) ) {
|
||||
if ( ! is_null( $this->query_offset ) && isset( $wpdb ) && ! empty( $wpdb->queries ) ) {
|
||||
for ( $i = $this->query_offset; $i < count( $wpdb->queries ); $i++ ) {
|
||||
$this->query_time += $wpdb->queries[ $i ][1];
|
||||
$this->query_count++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue