]> 91.132.146.200 Git - insipid.git/commitdiff
fixed changed json path from google pagespeedonline
authorBanana <mail@bananas-playground.net>
Wed, 22 Nov 2023 13:39:46 +0000 (14:39 +0100)
committerBanana <mail@bananas-playground.net>
Wed, 22 Nov 2023 13:39:46 +0000 (14:39 +0100)
ChangeLog
webroot/lib/snapshot.class.php

index 5bff93d65c53954a71b1c22eba73c8e4b7ef9110..d6512ed1296ec785e8081990a2a9a04ee3ca0905 100644 (file)
--- 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
 
index 46b52809cc4f42ef0cc3b5a70824febe92a8d23e..bfbdc73837d2d6a72a68e37e29c0027b8ea67f16 100644 (file)
@@ -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));