[eluser]jimdoescode[/eluser]
I seem to be having the same issue. Very frustrating.
I did discover that if you call
Code:
$this->input->post(...)
for any value prior to your update it will fail with the above behavior. So even if you do something like this...
Code:
$foo = $this->input->post('foo');
if($foo)
{
$bar = $_POST['bar'];
$this->model->updateBar($bar, $someID);
}
bar would always get set to either NULL or 0. The work around is...
Code:
$foo = $_POST['foo'];
if($foo)
{
$bar = $_POST['bar'];
$this->model->updateBar($bar, $someID);
}
Something seems to be invalidating the memory location for the $_POST array when you use the post method on input. Looking at the code in libraries/Input.php I can't see what it could possibly be though that method is pretty standard stuff.
Anyway as Noy pointed out the work around is to use all $_POST values when updating you can still call
Code:
$this->input->xss_clean(...)
on the result to avoid any possible security issues.