[-] CORE : fixed bug #PSCFV-5153 - intifier and desintifier from Cart class are not reliable

This commit is contained in:
vAugagneur
2012-10-31 10:35:19 +00:00
parent db518c5e6e
commit cc6a8ae3d6
+3 -3
View File
@@ -2204,7 +2204,7 @@ class CartCore extends ObjectModel
{ {
$elm = explode($delimiter, $string); $elm = explode($delimiter, $string);
$max = max($elm); $max = max($elm);
return strlen($max).join(str_repeat('0', strlen($max) + 1), $elm); return strlen($max).implode(str_repeat('0', strlen($max) + 1), $elm);
} }
/** /**
@@ -2213,9 +2213,9 @@ class CartCore extends ObjectModel
public static function desintifier($int, $delimiter = ',') public static function desintifier($int, $delimiter = ',')
{ {
$delimiter_len = $int[0]; $delimiter_len = $int[0];
$int = substr($int, 1); $int = strrev(substr($int, 1));
$elm = explode(str_repeat('0', $delimiter_len + 1), $int); $elm = explode(str_repeat('0', $delimiter_len + 1), $int);
return join($delimiter, $elm); return strrev(implode($delimiter, $elm));
} }
/** /**