diff --git a/collectors/db_queries.php b/collectors/db_queries.php index 25100129..e30b6238 100644 --- a/collectors/db_queries.php +++ b/collectors/db_queries.php @@ -236,7 +236,7 @@ public function process_db_object() { 'is_main_query' => true, ) ); - $this->data->total_qs = count( $this->data->rows ); + $this->data->total_qs = is_countable( $this->data->rows ) ? count( $this->data->rows ) : 0; // @phpstan-ignore-line ternary.elseUnreachable $this->data->total_time = $total_time; $this->data->has_result = $has_result; $this->data->has_trace = $has_trace;