We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Each time the Model::set() method is called, the value of $this->tempData['escape'] is overridden.
CodeIgniter4/system/Model.php
Lines 629 to 637 in d09a546
// escape value is lost $model = new OurModel(); $model->set('key', 'NOW()', false) //no escape ->set('key2', 'value') ->insert(); // INSERT INTO `some_table` (`key`, `key2`) VALUES ('NOW()', 'value')
If data is passed to the Model::insert() or Model::update() methods, then the data passed through the Model::set() method are ignored
Lines 675 to 685 in d09a546
// data is lost $model = new OurModel(); $model->set('key', 'NOW()') ->insert(['key2' => 'value']); //INSERT INTO `some_table` (`key2`) VALUES ('value')"
CodeIgniter 4 version 4.0.4 & Develop branch
Affected module(s) Codeigniter\Model
The text was updated successfully, but these errors were encountered:
InsertModelTest::testInsertWithSetAndEscape
Successfully merging a pull request may close this issue.
Each time the Model::set() method is called, the value of $this->tempData['escape'] is overridden.
CodeIgniter4/system/Model.php
Lines 629 to 637 in d09a546
If data is passed to the Model::insert() or Model::update() methods, then the data passed through the Model::set() method are ignored
CodeIgniter4/system/Model.php
Lines 675 to 685 in d09a546
CodeIgniter 4 version
4.0.4 & Develop branch
Affected module(s)
Codeigniter\Model
The text was updated successfully, but these errors were encountered: