13.1.04 Fix bug dot class

This commit is contained in:
Fred Tempez 2024-02-10 17:13:35 +01:00
parent 949373b39e
commit a176556081
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)) {
// Iterate array of paths
foreach ($key as $k) {
self::delete($k);
delete($k);
}
}
}

View File

@ -142,11 +142,6 @@ class JsonDb extends \Prowebcraft\Dot
*/
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);
$l = strlen($v);
$t = 0;