cphalcon
cphalcon copied to clipboard
Model's getChangedFields doesn't include fields with invalid values
Code sample:
class Sample extends \Phalcon\Mvc\Model {
public $id;
public $intVal;
}
$sample = Sample::findFirst();
$sample->intVal = 'a';
echo json_encode($sample->getChangedFields()) . "<br />; // This will return an empty array
echo "intVal value: {$sample->intVal}";
$sample->update(); // fails at this point because intVal is set incorrectly
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues