From c69cc3fb9fd9f4d6a830806b731b011f228ab563 Mon Sep 17 00:00:00 2001 From: Oleg Brezgalov Date: Fri, 11 Feb 2022 18:26:33 +0300 Subject: [PATCH] xhprof sampling mode doesnt return cpu etc --- src/Badoo/LiveProfilerUI/Aggregator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Badoo/LiveProfilerUI/Aggregator.php b/src/Badoo/LiveProfilerUI/Aggregator.php index a0c71f4..b79aa85 100644 --- a/src/Badoo/LiveProfilerUI/Aggregator.php +++ b/src/Badoo/LiveProfilerUI/Aggregator.php @@ -230,7 +230,7 @@ protected function processPerfdata(array $data) : bool } foreach ($this->fields as $profile_param => $aggregator_param) { - $value = $stats[$profile_param] > 0 ? $stats[$profile_param] : 0; + $value = array_key_exists($profile_param, $stats) && $stats[$profile_param] > 0 ? $stats[$profile_param] : 0; $this->call_map[$caller][$callee][$aggregator_param . 's'] .= $value . ','; if (array_key_exists($aggregator_param . 's', $this->method_data[$callee])) { $this->method_data[$callee][$aggregator_param . 's'] .= $value . ',';