Move bool to int conversion to buildParts(), so it also happens for update().
This commit is contained in:
parent
de2e6e137b
commit
2a17025d53
1 changed files with 3 additions and 1 deletions
4
lib/files/cache/cache.php
vendored
4
lib/files/cache/cache.php
vendored
|
@ -201,7 +201,6 @@ class Cache {
|
|||
$data['path'] = $file;
|
||||
$data['parent'] = $this->getParentId($file);
|
||||
$data['name'] = \OC_Util::basename($file);
|
||||
$data['encrypted'] = isset($data['encrypted']) ? ((int)$data['encrypted']) : 0;
|
||||
|
||||
list($queryParts, $params) = $this->buildParts($data);
|
||||
$queryParts[] = '`storage`';
|
||||
|
@ -265,6 +264,9 @@ class Cache {
|
|||
$params[] = $value;
|
||||
$queryParts[] = '`mtime`';
|
||||
}
|
||||
} elseif ($name === 'encrypted') {
|
||||
// Boolean to integer conversion
|
||||
$value = $value ? 1 : 0;
|
||||
}
|
||||
$params[] = $value;
|
||||
$queryParts[] = '`' . $name . '`';
|
||||
|
|
Loading…
Reference in a new issue