From 62fec4883d0b9e5620debb7b0ce85ce6438920cd Mon Sep 17 00:00:00 2001 From: marian1010 <79144276+marian1010@users.noreply.github.com> Date: Thu, 6 May 2021 09:52:59 +0200 Subject: [PATCH] Update manage_promotions.php --- panel_admin/manage_promotions.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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 "