From: Banana Date: Wed, 22 Nov 2023 13:39:46 +0000 (+0100) Subject: fixed changed json path from google pagespeedonline X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=d3b967991846ab536cf8490889fa5c0a5f2330a9;p=insipid.git fixed changed json path from google pagespeedonline --- diff --git a/ChangeLog b/ChangeLog index 5bff93d..d6512ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ version 2.x.x - Griffin Chapel () + Added TIMEZONE as a new config setting. Please update your config. See update.txt for more details. + + Snapshot json result from Google changed. Fixed. + Better logging + New home screen layout diff --git a/webroot/lib/snapshot.class.php b/webroot/lib/snapshot.class.php index 46b5280..bfbdc73 100644 --- a/webroot/lib/snapshot.class.php +++ b/webroot/lib/snapshot.class.php @@ -68,8 +68,8 @@ class Snapshot { if(DEBUG) { Summoner::sysLog("[DEBUG] Call result data: ".Summoner::cleanForLog($jsonData)); } - if(!empty($jsonData) && isset($jsonData['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data'])) { - $imageData = $jsonData['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data']; + if(!empty($jsonData) && isset($jsonData['lighthouseResult']['fullPageScreenshot']['screenshot']['data'])) { + $imageData = $jsonData['lighthouseResult']['fullPageScreenshot']['screenshot']['data']; $source = fopen($imageData, 'r'); $destination = fopen($filename, 'w'); @@ -79,7 +79,7 @@ class Snapshot { fclose($source); fclose($destination); } elseif(DEBUG) { - Summoner::sysLog("[DEBUG] invalid json data. Path ['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data'] not found in : ".Summoner::cleanForLog($jsonData)); + Summoner::sysLog("[DEBUG] invalid json data. Path ['lighthouseResult']['fullPageScreenshot']['screenshot']['data'] not found in : ".Summoner::cleanForLog($jsonData)); } } elseif(DEBUG) { Summoner::sysLog("[DEBUG] curl call failed ".Summoner::cleanForLog($theCall));