From cfb9d2708144af688891a29dc378931c10ac91e8 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Fri, 21 Feb 2020 17:32:16 -0800 Subject: [PATCH 1/3] Update http.php Exit foreach loop early if certain data are not defined. When undefined they cause many PHP notices. Fixes https://github.com/johnbillion/query-monitor/issues/500 --- output/html/http.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/output/html/http.php b/output/html/http.php index 12aa276e0..2cd34acf8 100644 --- a/output/html/http.php +++ b/output/html/http.php @@ -70,6 +70,9 @@ public function output() { $i = 0; foreach ( $data['http'] as $key => $row ) { + if ( ! isset( $row['ltime'], $row['component'] ) ){ + continue; + } $ltime = $row['ltime']; $i++; $is_error = false; From 76d42265d9cd4edd4f97c71977e4491b844bfd9b Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Fri, 21 Feb 2020 17:43:27 -0800 Subject: [PATCH 2/3] Update spacing On an iPad this is tougher than you think. --- output/html/http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/html/http.php b/output/html/http.php index 2cd34acf8..0d6b64cbb 100644 --- a/output/html/http.php +++ b/output/html/http.php @@ -70,7 +70,7 @@ public function output() { $i = 0; foreach ( $data['http'] as $key => $row ) { - if ( ! isset( $row['ltime'], $row['component'] ) ){ + if ( ! isset( $row['ltime'], $row['component'] ) ) { continue; } $ltime = $row['ltime']; From 2dcfbeff3494dcf0754155e6c7c3a80dd215554b Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Sun, 23 Feb 2020 19:03:06 -0800 Subject: [PATCH 3/3] Spacing alignment --- output/html/http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/html/http.php b/output/html/http.php index 0d6b64cbb..35590a7bd 100644 --- a/output/html/http.php +++ b/output/html/http.php @@ -70,7 +70,7 @@ public function output() { $i = 0; foreach ( $data['http'] as $key => $row ) { - if ( ! isset( $row['ltime'], $row['component'] ) ) { + if ( ! isset( $row['ltime'], $row['component'] ) ) { continue; } $ltime = $row['ltime'];