Skip to content

Commit

Permalink
Adding validation to prevent error message (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofernandezcr92 authored Sep 18, 2020
1 parent 34950db commit 832d540
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/Kima/Cache/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ public function get_by_file($key, $file_path)
}

$item = parent::get($this->prepare_key($key));
if (false === $item) {
return null;
}

return (filemtime($file_path) <= $item['timestamp']) ? $item['value'] : null;
}
Expand Down

0 comments on commit 832d540

Please sign in to comment.