mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 05:49:03 +01:00
do NOT (re)move data with numerical indexes to JSON blob, as filters are also run through data2db
This commit is contained in:
parent
a4cc3ef55f
commit
b45a33842b
@ -137,7 +137,10 @@ class Json extends Base
|
||||
$data = &$this->data;
|
||||
}
|
||||
// json-encode non db columns into ths json blob
|
||||
if ($this->json_column && is_array($data) && ($json = array_diff_key($data, array_flip($this->db_cols+[self::USER_TIMEZONE_READ]))))
|
||||
if ($this->json_column && is_array($data) && ($json = array_filter($data, function($key)
|
||||
{
|
||||
return !is_int($key) && !isset($this->db_cols[$key]) && !in_array($key, [self::USER_TIMEZONE_READ]);
|
||||
}, ARRAY_FILTER_USE_KEY)))
|
||||
{
|
||||
$data = [
|
||||
$this->json_column => json_encode($json, JSON_UNESCAPED_SLASHES|JSON_THROW_ON_ERROR),
|
||||
|
Loading…
Reference in New Issue
Block a user