diff --git a/core/class/event.class.php b/core/class/event.class.php index 758d284506..ff19f2fcd7 100644 --- a/core/class/event.class.php +++ b/core/class/event.class.php @@ -31,7 +31,7 @@ class event { public static function add($_event, $_options = array(),$_clean = true) { if(is_array($_options)){ - $_options = json_encode($_options); + $_options = json_encode($_options, JSON_UNESCAPED_UNICODE); } $value = array( 'datetime' => getmicrotime(), @@ -93,16 +93,13 @@ public static function cleanEvent() { continue; } else { $find[$id]->remove(); + unset($find[$id]); } } $find[$id] = $event; } } - public static function orderEvent($a, $b) { - return ($a['datetime'] - $b['datetime']); - } - public static function changes($_datetime, $_longPolling = null, $_filter = null) { $return = self::filterEvent(self::changesSince($_datetime), $_filter); if ($_longPolling === null || count($return) > 0) {