Skip to content

Commit

Permalink
Error inserting data
Browse files Browse the repository at this point in the history
+----------------------+--------------+------+-----+---------+-------+
| Field                | Type         | Null | Key | Default | Extra |
+----------------------+--------------+------+-----+---------+-------+
| bookingStayId        | varchar(20)  | NO   | PRI | NULL    |       |
| bookingRoomNum       | int(8)       | NO   | PRI | NULL    |       |
| multiRoomNumber      | int(8)       | NO   | PRI | 0       |       |

Primary key multiRoomNumber with default value as 0 is seen as empty.
This leads to an outofmemory.
  • Loading branch information
tcordel authored and ikkez committed Dec 30, 2019
1 parent 221f0c9 commit 0c684da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sql/mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function insert() {
if ($field['pkey']) {
$field['previous']=$field['value'];
if (!$inc && $field['pdo_type']==\PDO::PARAM_INT &&
empty($field['value']) && !$field['nullable'])
is_null($field['value']) && !$field['nullable'])
$inc=$key;
$filter.=($filter?' AND ':'').$this->db->quotekey($key).'=?';
$nkeys[$nctr+1]=[$field['value'],$field['pdo_type']];
Expand Down

0 comments on commit 0c684da

Please sign in to comment.