You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Good day, I dont really know where to post this as it feels asif it maybe more a PHP bug itself
than a Code Igniter, but here goes
I have a intermittend issue where with SQLite3 driver adding line with inserBatch function (all inside a transaction)
of builder the lasterror report does not always return the error. I have added debug lines to the code to try and see where
it goes wrong and this is the odd part. It actually still have the correct error reporting just as simpleQuery executes the insertSQL, but immediatly after it , it just falls back to 0 and message 'not a error'.
Now the Code changes (debug lines) I made was in
SQLite3\Connection.php
In BaseConnection.php inside the public function query function
and
BaseBuilder.php in the public function insertBatch
Note that I call inserbatch nommerally as follows $builder->insertBatch($insertVals);
There is a workaround thou and that is why I think it is a PHP thing.
If I do a dummy query (something that will return nonthing for the table ) before I do the insertBatch
Then it WORKS !, it is so weird.
Also note I experience this intermittend issue only with my interface that accept JSON data as input, when I wrote a test
controller interface that does everything in code (even the array was hardcoded), then it worked every time without the workaround.
Expected behavior, and steps to reproduce if appropriate
If a Error is experienced and one calls the error function that calls the lastError function one would expect the error
that was returned first just after execute to still show instead of 0.
Context
Win 7
Xamp (Apache/php)
PHP 7.4
The text was updated successfully, but these errors were encountered:
devorama
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Jul 18, 2020
Could you please provide some sample code that will allow us to reproduce this bug? As I understand it's not that obvious. If you need more files to present this you can use gist.
Will try so far I could only do it as I am actually writting a external system that sends in json data and then CI process that , when I tried to emulate the data by pasting the json in code and just running the code, but when I feed it in via http stream then it does this, thus little tricky. Will see what I can figure out to emulate it. Thanks
Describe the bug
Good day, I dont really know where to post this as it feels asif it maybe more a PHP bug itself
than a Code Igniter, but here goes
I have a intermittend issue where with SQLite3 driver adding line with inserBatch function (all inside a transaction)
of builder the lasterror report does not always return the error. I have added debug lines to the code to try and see where
it goes wrong and this is the odd part. It actually still have the correct error reporting just as simpleQuery executes the insertSQL, but immediatly after it , it just falls back to 0 and message 'not a error'.
My log file looks as follow
Now the Code changes (debug lines) I made was in
SQLite3\Connection.php
In BaseConnection.php inside the public function query function
and
BaseBuilder.php in the public function insertBatch
Note that I call inserbatch nommerally as follows
$builder->insertBatch($insertVals);
There is a workaround thou and that is why I think it is a PHP thing.
If I do a dummy query (something that will return nonthing for the table ) before I do the insertBatch
Then it WORKS !, it is so weird.
Also note I experience this intermittend issue only with my interface that accept JSON data as input, when I wrote a test
controller interface that does everything in code (even the array was hardcoded), then it worked every time without the workaround.
CodeIgniter 4 version
4.0.4
Affected module(s)
BaseBuilder.php
BaseConnection.php
SQLite3\Connection.php
Expected behavior, and steps to reproduce if appropriate
If a Error is experienced and one calls the error function that calls the lastError function one would expect the error
that was returned first just after execute to still show instead of 0.
Context
Win 7
Xamp (Apache/php)
PHP 7.4
The text was updated successfully, but these errors were encountered: