fix: convert empty strings to null for integer/bool columns
MySQL strict mode rejects empty string '' for integer columns like is_internal. Convert '' and false to null before SQL insert. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -348,6 +348,11 @@ class EntityImporter
|
||||
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
// Fix empty strings for integer/bool columns (MySQL strict mode)
|
||||
if ($value === '' || $value === false) {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
$columns[] = "`{$column}`";
|
||||
$values[] = $value;
|
||||
$placeholders[] = '?';
|
||||
|
||||
Reference in New Issue
Block a user