Skip to content

Commit c612994

Browse files
committed
Fix PHP 7.2 incompatibility
1 parent 75ec5e7 commit c612994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/class-logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function stop() {
6161
if ( ! is_null( $this->start_time ) ) {
6262
$this->time += microtime( true ) - $this->start_time;
6363
}
64-
if ( ! is_null( $this->query_offset ) && isset( $wpdb ) ) {
64+
if ( ! is_null( $this->query_offset ) && isset( $wpdb ) && ! empty( $wpdb->queries ) ) {
6565
for ( $i = $this->query_offset; $i < count( $wpdb->queries ); $i++ ) {
6666
$this->query_time += $wpdb->queries[ $i ][1];
6767
$this->query_count++;

0 commit comments

Comments
 (0)