Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Error after upgrade to 1.37 (Error after upgrade to 1.37)
Error after upgrade to 1.37 [message #1522] Fri, 08 August 2008 18:02 Go to next message
divico is currently offline  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.
Re: Error after upgrade to 1.37 [message #1524 is a reply to message #1522] Fri, 08 August 2008 18:28 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
I have changed
if (empty($value) {
to
if (strlen($value) == 0) {
See attached file.


Previous Topic: Two fields not showing -Solved
Next Topic: Backslash adding in CONCAT in calculated field
Goto Forum:
  


Current Time: Fri Mar 29 06:48:03 EDT 2024

Total time taken to generate the page: 0.01023 seconds