Get values when 0
This commit is contained in:
@ -19,7 +19,7 @@ class USD
|
||||
$usds = [];
|
||||
try {
|
||||
$usds = json_decode($this->redisService->get($this->redisKey), JSON_OBJECT_AS_ARRAY);
|
||||
if (!isset($usds[$date->format('Y-m-d')])) {
|
||||
if (!isset($usds[$date->format('Y-m-d')]) or $usds[$date->format('Y-m-d')] === 0) {
|
||||
throw new EmptyRedis($this->redisKey);
|
||||
}
|
||||
$usd = $usds[$date->format('Y-m-d')];
|
||||
|
Reference in New Issue
Block a user