summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-26 22:43:19 +0200
committerJoas Schilling <coding@schilljs.com>2017-03-26 22:43:19 +0200
commit75eee315a31a4dc223cf47b82565fd5cb0b97742 (patch)
tree7224d45907f262f1b3d24f6f9f39a18feb82176f
parent2961c735e3f92a150e0139b2af275e33e54377c4 (diff)
downloadnextcloud-server-75eee315a31a4dc223cf47b82565fd5cb0b97742.tar.gz
nextcloud-server-75eee315a31a4dc223cf47b82565fd5cb0b97742.zip
Use false because null crashes the cache
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--core/Command/Db/ConvertType.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php
index 5bb43400d61..4ca7899fec6 100644
--- a/core/Command/Db/ConvertType.php
+++ b/core/Command/Db/ConvertType.php
@@ -308,7 +308,12 @@ class ConvertType extends Command implements CompletionAwareInterface {
}
foreach ($row as $key => $value) {
- $insertQuery->setParameter($key, $value, $this->getColumnType($table, $key));
+ $type = $this->getColumnType($table, $key);
+ if ($type !== false) {
+ $insertQuery->setParameter($key, $value, $type);
+ } else {
+ $insertQuery->setParameter($key, $value);
+ }
}
$insertQuery->execute();
}
@@ -321,9 +326,10 @@ class ConvertType extends Command implements CompletionAwareInterface {
if (isset($this->columnTypes[$table][$column])) {
return $this->columnTypes[$table][$column];
}
-
$prefix = $this->config->getSystemValue('dbtableprefix', 'oc_');
- $this->columnTypes[$table][$column] = null;
+
+ $this->columnTypes[$table][$column] = false;
+
if ($table === $prefix . 'cards' && $column === 'carddata') {
$this->columnTypes[$table][$column] = IQueryBuilder::PARAM_LOB;
} else if ($column === 'calendardata') {