Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions caching_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ public function process($data)
// Traverse the caching object with translations
foreach ($translate as $search => $field) {

if (! is_array($cachingjson[0]["result"])){
//if (! is_array($cachingjson[0]["result"])){
if (! is_array($cachingjson) || ! is_array($cachingjson[0]["result"] ?? false )) continue; {
// If not an array, null the field
$this->$field = '';

Expand Down Expand Up @@ -262,7 +263,8 @@ public function process($data)
$this->create();

// Process exact_metrics, if it exists
if($cachingjson[0]["result"]['exact_metrics']){
//if($cachingjson[0]["result"]['exact_metrics']){
if(isset($cachingjson[0]["result"])) if($cachingjson[0]["result"]['exact_metrics']){
$pastThirtyone = (time()-2678400);
// Split entries into array
$exact_array = explode("__", $cachingjson[0]["result"]['exact_metrics']);
Expand Down Expand Up @@ -357,3 +359,4 @@ public function process($data)
}
} // End process()
}