mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Apply numeric array conversion to every JSON request as well
This commit is contained in:
parent
fed4f950bf
commit
e2199f19ec
1 changed files with 9 additions and 13 deletions
|
|
@ -15,24 +15,20 @@ class JSONDisplayHandler
|
|||
$variables['error'] = $oModule->getError();
|
||||
$variables['message'] = $oModule->getMessage();
|
||||
|
||||
if (Context::getRequestMethod() === 'XMLRPC')
|
||||
$temp = array();
|
||||
foreach ($variables as $key => $value)
|
||||
{
|
||||
$temp = array();
|
||||
foreach ($variables as $key => $value)
|
||||
if (self::_isNumericArray($value))
|
||||
{
|
||||
if (self::_isNumericArray($value))
|
||||
{
|
||||
$temp[$key] = array_values($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp[$key] = $value;
|
||||
}
|
||||
$temp[$key] = array_values($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp[$key] = $value;
|
||||
}
|
||||
$variables = $temp;
|
||||
}
|
||||
|
||||
return json_encode($variables);
|
||||
return json_encode($temp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue