Commit b542793b40b18172f055ff37117645309df634d2
1 parent
cdff0153
prices
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
... | ... | @@ -137,8 +137,12 @@ |
137 | 137 | } |
138 | 138 | |
139 | 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 | 147 | $css = [ |
144 | 148 | '/landing_sales/style.css', | ... | ... |