diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index d9270b15cfff..02eb247b61f8 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -341,6 +341,9 @@ public function update($id, array $data) { if ($value === '') { $data[$param] = null; } + if ($value === null && \in_array($param, ['mtime', 'storage_mtime'], true)) { + $data[$param] = 0; + } } } @@ -411,7 +414,7 @@ protected function buildParts(array $data) { $params = []; $queryParts = []; foreach ($data as $name => $value) { - if (\array_search($name, $fields) !== false) { + if (\in_array($name, $fields, true)) { if ($name === 'path') { $params[] = \md5($value); $queryParts[] = '`path_hash`';