From 67087589dc64d39c5c5cef77068f4f41080d91ad Mon Sep 17 00:00:00 2001 From: evanlu Date: Fri, 7 Oct 2022 09:44:54 -0700 Subject: [PATCH] Fixed undefined variable error in \www\page_data.inc --- www/page_data.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/page_data.inc b/www/page_data.inc index 007db0aa15..24b93de81b 100644 --- a/www/page_data.inc +++ b/www/page_data.inc @@ -316,12 +316,12 @@ function loadPageStepData($localPaths, $testInfo = null) } if (count($layout_shifts)) { $ret['LayoutShifts'] = $layout_shifts; - + $count = 0; + $cls = 0; + $fraction = 0; + // Count the number of LayoutShifts before first paint if (isset($ret['chromeUserTiming.TotalLayoutShift']) && isset($ret['chromeUserTiming.firstPaint'])) { - $count = 0; - $cls = 0; - $fraction = 0; foreach ($ret['LayoutShifts'] as $shift) { if (isset($shift['time']) && $shift['time'] <= $ret['chromeUserTiming.firstPaint']) { $count++;