From a2925b51cb340140cf90a59bb60e96a3d585954b Mon Sep 17 00:00:00 2001 From: Babak Alizadeh Date: Sat, 15 Mar 2025 09:22:46 +0000 Subject: [PATCH] bug fix in explore commodity --- hesabixCore/src/Service/Explore.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hesabixCore/src/Service/Explore.php b/hesabixCore/src/Service/Explore.php index 71a7a2f..a759dd7 100644 --- a/hesabixCore/src/Service/Explore.php +++ b/hesabixCore/src/Service/Explore.php @@ -214,11 +214,14 @@ class Explore 'name' => $item->getUnit()->getName(), 'floatNumber' => $item->getUnit()->getFloatNumber(), ], - 'cat'=>$item->getCat()->getName() ]; if ($des) { $result['des'] = $des; } + $result['cat'] = ''; + if ($item->getCat()) { + $result['cat'] = $item->getCat()->getName(); + } return $result; }