Menu

#17 Inserting NULLs Failure

Current release
open
nobody
5
2009-05-30
2009-05-30
No

Null values cannot be inserted into records. The fix seems to be adding the following code at the beginning of _get_immediate() (at line 601 of gladius.php):

if (preg_match('/\\s*(null)\\s*/iA', $this->sql, $m, PREG_OFFSET_CAPTURE, $this->offset)) {
$this->offset = $m[0][1]+strlen($m[0][0]);
return new value( NULL, $this);
}

At the same time I noticed that the preceding function _get_hand() calls "new nvalue" to create null values. There is no such object as "nvalue". Changing that to just "value" would seem to be the correct thing.

Discussion


Log in to post a comment.