View Issue Details

IDProjectCategoryView StatusLast Update
0003142OXID eShop (all versions)1.03. Basket, checkout processpublic2012-12-10 13:23
Reportera-mazing Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version4.5.1 revision 38045 
Summary0003142: Decimals are cut off at DB update if ',' is used as separator
DescriptionWhen processing an order, the correct numbers are used in the confirmation mail, but all decimals are cut off when writing to the database if ',' is used as the decimal separator.

As a quick workaround i do

// Workaround: decimals are cut off from floats with wrong separator
if(preg_match('/^[0-9]+,[0-9]+$/', $value)) {
  $value = str_replace(',', '.', $value);
}


in core/oxbase.php line 1276, function _getUpdateFieldValue.

I'm sure there are better ways to do this... ;-)
Additional InformationServer is running Linux / Debian Wheezy (Testing)
mySQL 5.1.58-1
PHP 5.3.6-13
Apache 2.2.19-1 with MPM-ITK
TagsOrder
ThemeAzure
BrowserAll
PHP Version5.3
Database Version5.1

Activities

a-mazing

2011-09-06 15:39

reporter   ~0005183

Last edited: 2011-09-06 15:41

After update to version 4.5.2 Rev 38481 this bug still persists.
The name of the variable changed and some lines of code got added further up in the file, so my little workaround now looks like this:

// Workaround for 0003142: decimals are cut off from floats with wrong separator
if(preg_match('/^[0-9]+,[0-9]+$/', $mValue)) {
  $mValue = str_replace(',', '.', $mValue);
}

and has to be inserted in line 1285 of core/oxbase.php.

Am I the only one experiencing this problem?

a-mazing

2011-10-26 12:41

reporter   ~0005337

I now was able to track down the PHP-PS-Extension as basic cause of this problem:

http://packages.debian.org/wheezy/php5-ps
http://pecl.php.net/package/ps

After deactivating this extension on the server, everything now works as intended.
This issue can now be closed...