mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Also fix JSON encoding when the result contains objects not arrays
This commit is contained in:
parent
379bed000d
commit
705ad34c49
1 changed files with 4 additions and 0 deletions
|
|
@ -30,6 +30,10 @@ class JSONDisplayHandler
|
||||||
{
|
{
|
||||||
foreach ($array as $key => &$value)
|
foreach ($array as $key => &$value)
|
||||||
{
|
{
|
||||||
|
if (is_object($value))
|
||||||
|
{
|
||||||
|
$value = get_object_vars($value);
|
||||||
|
}
|
||||||
if (is_array($value))
|
if (is_array($value))
|
||||||
{
|
{
|
||||||
self::_convertCompat($value, $compat_type);
|
self::_convertCompat($value, $compat_type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue