diff --git a/www-api/app/Controllers/WrenchJobs.php b/www-api/app/Controllers/WrenchJobs.php index b768bf6a..c3e39059 100644 --- a/www-api/app/Controllers/WrenchJobs.php +++ b/www-api/app/Controllers/WrenchJobs.php @@ -53,7 +53,12 @@ class WrenchJobs extends BaseController $endpoint = "JOB_DATA-". $in["uid"]; $out = $this->getCache($endpoint); - if ( count($out)==0 ){ + $countItem = 0; + if( is_array($out)){ + $countItem = count($out); + } + + if ( $countItem == 0 ){ $local_url = "http://".$this->micro_service_net1.":3033/marketjobs"; $out = $this->APIcall('GET', $local_url, $in); $this->saveCache($endpoint,$out,3000);