Commit e38b50d0f5403ceba8101eb381f09c7baaf88277

Authored by Alex Savenko
2 parents d9b850ba b542793b

Merge branch 'discount' of gitlab.artweb.com.ua:Alex/semena

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
src/app/frontend/controllers/PageController.php
@@ -137,8 +137,12 @@ @@ -137,8 +137,12 @@
137 } 137 }
138 138
139 $discount = $this->models->getDiscount()->getActiveData(); 139 $discount = $this->models->getDiscount()->getActiveData();
140 -  
141 - $discount = $discount[0]['discount']; 140 + if (!empty($discount)) {
  141 + $discount = $discount[0]['discount'];
  142 + }
  143 + else {
  144 + $discount = 0;
  145 + }
142 146
143 $css = [ 147 $css = [
144 '/landing_sales/style.css', 148 '/landing_sales/style.css',