From e084ec7677c4163af6fd0ab2173b9ede5787d5b2 Mon Sep 17 00:00:00 2001 From: miniwater <1456441157@qq.com> Date: Thu, 13 Nov 2025 13:52:42 +0800 Subject: [PATCH] fix HP Warning: Undefined array key "line" --- collectors/db_queries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectors/db_queries.php b/collectors/db_queries.php index 25100129..5053db70 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 = count( $this->data->rows ?? [] ); $this->data->total_time = $total_time; $this->data->has_result = $has_result; $this->data->has_trace = $has_trace;