Modify ↓
#1477 closed Bug/Fehler (fixed)
Division by Zero in admin/specials.php
| Reported by: | Owned by: | somebody | |
|---|---|---|---|
| Priority: | niedrig | Milestone: | modified-shop-2.0.5.0 |
| Component: | Admin | Version: | 2.0.4.0 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
Guten Morgen,
es wird zwar selten vorkommen, bei einem meiner Kunden trat es aber auf:
Ist ein Artikelpreis mit 0 Euro angegeben und zu diesem Artikel existiert ein (aktives oder nicht aktives) Sonderangebot, gibt es eine Warning in Zeile 341 der admin/specials.php
$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / $sInfo->products_price) * 100)) . '%');
Mein Vorschlag ist, die Zeile einfach zu ersetzen durch:
if(empty($sInfo->products_price))
$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' 0%');
else
$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / $sInfo->products_price) * 100)) . '%');
Attachments (0)
Change History (2)
comment:1 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 7 years ago
| Milestone: | modified-shop-2.0.4.1 → modified-shop-2.0.5.0 |
|---|
Note:
See TracTickets
for help on using tickets.

In 11281: