1.4.23 Fix bug dot class

This commit is contained in:
Fred Tempez 2024-02-10 17:13:38 +01:00
parent 3bedbed4ef
commit 6da8223209
2 changed files with 1 additions and 6 deletions

View File

@ -141,7 +141,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
} elseif (is_array($key)) { } elseif (is_array($key)) {
// Iterate array of paths // Iterate array of paths
foreach ($key as $k) { foreach ($key as $k) {
self::delete($k); delete($k);
} }
} }
} }

View File

@ -142,11 +142,6 @@ class JsonDb extends \Prowebcraft\Dot
*/ */
public function save() public function save()
{ {
//$v = json_encode($this->data, JSON_UNESCAPED_UNICODE );
if ($this->data === null) {
error_log('Tentative d\'enregistrer de données nulles, enregistrement annulé.');
exit('Tentative d\'enregistrer de données nulles, enregistrement annulé.');
}
$v = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT); $v = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT);
$l = strlen($v); $l = strlen($v);
$t = 0; $t = 0;