mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
add new rule
This commit is contained in:
@@ -54,8 +54,7 @@ function dol_json_encode($elements)
|
||||
{
|
||||
foreach ($elements as $key => $value) $num++;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$num = count($elements);
|
||||
}
|
||||
//var_dump($num);
|
||||
@@ -75,8 +74,7 @@ function dol_json_encode($elements)
|
||||
}
|
||||
$output .= ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
// associative (object)
|
||||
$output = '{';
|
||||
$last = $num - 1;
|
||||
@@ -201,7 +199,7 @@ function _val($val)
|
||||
elseif (is_int($val)) return sprintf('%d', $val);
|
||||
elseif (is_float($val)) return sprintf('%F', $val);
|
||||
elseif (is_bool($val)) return ($val ? 'true' : 'false');
|
||||
else return 'null';
|
||||
else return 'null';
|
||||
}
|
||||
|
||||
if (!function_exists('json_decode'))
|
||||
|
||||
Reference in New Issue
Block a user