[-] CORE : fixed bug #PSCFV-5153 - intifier and desintifier from Cart class are not reliable
This commit is contained in:
+3
-3
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user