Use false because null crashes the cache

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-26 22:43:19 +02:00
parent 2961c735e3
commit 75eee315a3
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 9 additions and 3 deletions

View File

@ -308,7 +308,12 @@ class ConvertType extends Command implements CompletionAwareInterface {
} }
foreach ($row as $key => $value) { 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(); $insertQuery->execute();
} }
@ -321,9 +326,10 @@ class ConvertType extends Command implements CompletionAwareInterface {
if (isset($this->columnTypes[$table][$column])) { if (isset($this->columnTypes[$table][$column])) {
return $this->columnTypes[$table][$column]; return $this->columnTypes[$table][$column];
} }
$prefix = $this->config->getSystemValue('dbtableprefix', 'oc_'); $prefix = $this->config->getSystemValue('dbtableprefix', 'oc_');
$this->columnTypes[$table][$column] = null;
$this->columnTypes[$table][$column] = false;
if ($table === $prefix . 'cards' && $column === 'carddata') { if ($table === $prefix . 'cards' && $column === 'carddata') {
$this->columnTypes[$table][$column] = IQueryBuilder::PARAM_LOB; $this->columnTypes[$table][$column] = IQueryBuilder::PARAM_LOB;
} else if ($column === 'calendardata') { } else if ($column === 'calendardata') {