don't fail to trace CLI

This commit is contained in:
Shish 2020-02-02 17:00:55 +00:00
parent 9d704183c7
commit d880dc7997

View file

@ -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);
}
}