From d880dc79970fb7a9a564a11eddef1ee9b31206c0 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 2 Feb 2020 17:00:55 +0000 Subject: [PATCH] don't fail to trace CLI --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 8be28854..f0010b7e 100644 --- a/index.php +++ b/index.php @@ -152,7 +152,10 @@ try { $_tracer->end(); if (TRACE_FILE) { - if ((microtime(true) - $_shm_load_start) > TRACE_THRESHOLD && $_SERVER["REQUEST_URI"] != "/upload") { + if ( + (microtime(true) - $_shm_load_start) > TRACE_THRESHOLD + && ($_SERVER["REQUEST_URI"] ?? "") != "/upload" + ) { $_tracer->flush(TRACE_FILE); } }