Error after upgrade to 1.37 [message #1522] |
Fri, 08 August 2008 18:02 |
divico
Messages: 16 Registered: August 2008
|
Junior Member |
|
|
Hi,
After upgrading to 1.37 my application fails. I'm getting:
Column 'xxx' cannot be null (# 1048).
I call updateRecord, column (type integer) mentioned in the error message currently has a value of 2, new value is 0.
I tracked the error down to method updateRecord in Class mysql (file dml.mysqli.class.inc). Error occurs because a new if statement was introduced in this method:
...
} elseif (preg_match($pattern, $fieldspec[$item]['type'], $match)) {
if (empty($value) {
$update .= "$item=NULL,";
}
...
Since a value of 0 is considered as empty in PHP the value of the column is set to NULL which, in my case, is not valid.
|
|
|