Add fix for DB Array IO json error_check type field storage on empty save
This commit is contained in:
@@ -424,6 +424,11 @@ class ArrayIO extends \CoreLibs\DB\IO
|
|||||||
$_value = 'NULL';
|
$_value = 'NULL';
|
||||||
}
|
}
|
||||||
$q_data .= $_value;
|
$q_data .= $_value;
|
||||||
|
} else {
|
||||||
|
// if the error check is json, we set field to null if NOT set
|
||||||
|
// else normal string write
|
||||||
|
if ($this->table_array[$column]['error_check'] == 'json' && !$this->table_array[$column]['value']) {
|
||||||
|
$q_data .= 'NULL';
|
||||||
} else {
|
} else {
|
||||||
// normal string
|
// normal string
|
||||||
$q_data .= "'";
|
$q_data .= "'";
|
||||||
@@ -436,6 +441,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
|||||||
$q_data .= "'";
|
$q_data .= "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // while ...
|
} // while ...
|
||||||
|
|
||||||
// NOW get PK, and FK settings (FK only for update query)
|
// NOW get PK, and FK settings (FK only for update query)
|
||||||
|
|||||||
Reference in New Issue
Block a user