From 595d068de2a45ca48da4ff88e4c8f8fded2c0017 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 10 Feb 2024 19:46:52 +0100 Subject: [PATCH] 1.4.25 Corrige la fonction delete de la classe dot --- core/class/jsondb/Dot.class.php | 10 +++++----- core/core.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/class/jsondb/Dot.class.php b/core/class/jsondb/Dot.class.php index 98def5e..8ae39fb 100644 --- a/core/class/jsondb/Dot.class.php +++ b/core/class/jsondb/Dot.class.php @@ -101,7 +101,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable } } else { // Iterate path - $keys = explode('.', (string)$key); + $keys = explode('.', (string) $key); if ($pop === true) { array_pop($keys); } @@ -141,7 +141,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable } elseif (is_array($key)) { // Iterate array of paths foreach ($key as $k) { - delete($k); + self::deleteValue($array, $k); } } } @@ -199,7 +199,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable */ public function has($key) { - $keys = explode('.', (string)$key); + $keys = explode('.', (string) $key); $data = &$this->data; foreach ($keys as $key) { if (!isset($data[$key])) { @@ -371,7 +371,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable */ public function isEmpty(): bool { - return !(bool)count($this->data); + return !(bool) count($this->data); } /** @@ -391,7 +391,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable */ public function toJson() { - return json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT); + return json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); } /** diff --git a/core/core.php b/core/core.php index 44a25d6..ad4563b 100644 --- a/core/core.php +++ b/core/core.php @@ -51,7 +51,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.4.24'; + const ZWII_VERSION = '1.4.25'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';