﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
2359	Divison by zero Warning in xtcPrice Class	noRiddle	somebody	"Hatte in einem Shop plötzlich dieses Warning:
{{{
Division by zero in File: /PATH/includes/classes/xtcPrice.php on Line: 760
}}}


Kommen dürfte das von Zeile 181 ff:
{{{
    if ((float)$pPrice == 0) {
      $pPrice = $this->getPprice($pID);
    }
}}}

und kommt vor wenn ein Preis in der Tabelle ''products'' auf 0.0000 steht, was vorkommen kann wenn man Artikel über eine Lieferanten-API automatisiert updatet.
Vorschlag dazu wäre den Code zu ändern in
{{{
    if (!((float)$pPrice > 0)) {
      $pPrice = $this->getPprice($pID);
    }
}}}

Gruß,
noRiddle
"	Bug/Fehler	closed	normal	modified-shop-2.0.8.0	Shop	2.0.7.2	duplicate				
