diff --git a/app/api/controller/Recovery.php b/app/api/controller/Recovery.php index 4ff14c11..533cd656 100644 --- a/app/api/controller/Recovery.php +++ b/app/api/controller/Recovery.php @@ -68,8 +68,10 @@ class Recovery extends Controller public function add(): Json { $imageIds = $this->request->post('image_ids'); - if (!is_array($imageIds)) { + if ($imageIds && !is_array($imageIds)) { $imageIds = explode(',', $imageIds); + } else { + $imageIds = []; } $shop_id = intval($this->request->post('shop_id')); if (!$shop_id) {