From 8157ab69ad35d36e469651286b89a2fb08af7509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:31:43 +0200 Subject: [PATCH] bugfix --- core/class/event.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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) {