From e27fad7415d856ad6a126842b05bf36f1a3f37ec Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 26 Aug 2024 09:36:00 -0400 Subject: [PATCH] $countItem --- www-api/app/Controllers/WrenchJobs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);