cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Model's getChangedFields doesn't include fields with invalid values

Open nsossonko opened this issue 11 years ago • 1 comments

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

nsossonko avatar Oct 21 '15 15:10 nsossonko

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

stale[bot] avatar Apr 17 '18 03:04 stale[bot]