mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 21:34:42 +03:00
Fix problem with not serial keys and JSON response
This commit is contained in:
parent
4e3593375f
commit
06991af115
@ -327,9 +327,12 @@ class UsersProcessor extends ClientSideProcessor
|
||||
$dispatcher = EventDispatcher::getInstance();
|
||||
$dispatcher->triggerEvent('usersUpdateThreadsAlter', $arguments);
|
||||
|
||||
// Send results back to the client
|
||||
// Send results back to the client. "array_values" function should be
|
||||
// used to avoid problems with JSON conversion. If there will be gaps in
|
||||
// keys (the keys are not serial) JSON Object will be produced instead
|
||||
// of an Array.
|
||||
return array(
|
||||
'threads' => $arguments['threads'],
|
||||
'threads' => array_values($arguments['threads']),
|
||||
'lastRevision' => $revision,
|
||||
);
|
||||
}
|
||||
@ -470,8 +473,12 @@ class UsersProcessor extends ClientSideProcessor
|
||||
);
|
||||
$dispatcher->triggerEvent('usersUpdateVisitorsAlter', $arguments);
|
||||
|
||||
// Send results back to the client. "array_values" function should be
|
||||
// used to avoid problems with JSON conversion. If there will be gaps in
|
||||
// keys (the keys are not serial) JSON Object will be produced instead
|
||||
// of an Array.
|
||||
return array(
|
||||
'visitors' => $arguments['visitors'],
|
||||
'visitors' => array_values($arguments['visitors']),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user