]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use false because null crashes the cache 4071/head
authorJoas Schilling <coding@schilljs.com>
Sun, 26 Mar 2017 20:43:19 +0000 (22:43 +0200)
committerJoas Schilling <coding@schilljs.com>
Sun, 26 Mar 2017 20:43:19 +0000 (22:43 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Command/Db/ConvertType.php

index 5bb43400d61ff56005db0694385dc4e7cc5c6de1..4ca7899fec6ec5316a08890f90aeffedb8d82f0d 100644 (file)
@@ -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') {