diff --git a/panel_admin/manage_promotions.php b/panel_admin/manage_promotions.php index 301bef7..abea7c8 100644 --- a/panel_admin/manage_promotions.php +++ b/panel_admin/manage_promotions.php @@ -18,14 +18,15 @@ $codes = array(); $actives = array(); - foreach($promos as $key => $value){ - $ids[$key] = $value->getId(); - $tittles[$key] = $value->getTittle(); - $descriptions[$key] = $value->getDescription(); - $codes[$key] = $value->getCode(); - $actives[$key] = $value->getActive(); + if(is_array($promos)){ + foreach($promos as $key => $value){ + $ids[$key] = $value->getId(); + $tittles[$key] = $value->getTittle(); + $descriptions[$key] = $value->getDescription(); + $codes[$key] = $value->getCode(); + $actives[$key] = $value->getActive(); + } } - echo "