From fb31d08abaf7576cb8acc9a19e6ecfb931ac8a39 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 3 Mar 2019 15:13:44 +0100 Subject: [PATCH] fix column_data_explode or update $col => array() gives SQL error writing it now as NULL (or "" if column is NOT NULL) --- api/src/Db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Db.php b/api/src/Db.php index e02cb23bd0..25fb48239f 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -1567,7 +1567,7 @@ class Db $maxlength = in_array($column_definitions[$col]['type'], array('varchar','ascii')) ? $column_definitions[$col]['precision'] : null; } // dont use IN ( ), if there's only one value, it's slower for MySQL - if (is_array($data) && count($data) == 1) + if (is_array($data) && count($data) <= 1) { $data = array_shift($data); }