Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Activerecord update method refuses to insert NULL value
#7

[eluser]jomanlk[/eluser]
Woah! I'm using 1.7.2. After you pointed out that it worked for you, I tried digging a bit deeper and found the culprit! We use a base model to store all the basic db methods. In that method there's a filter method that loops through the keys to clean them,

Code:
if($xss_clean === true && !in_array($v, $skip_types)) {
    $data[$k] = $this->input->xss_clean($v);
}

xss_clean($v) was the problem! The moment something like NULL, FALSE, TRUE went in, it came out as the string representation. I added an exclusion list and it solved the problem.

Totally felt like a noob for not having looked in there, but all's well that ends well, I guess.

Thanks!


Messages In This Thread
Codeigniter Activerecord update method refuses to insert NULL value - by El Forum - 08-19-2010, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB