-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
last() failes while quoting integer #1011
Comments
I dived a bit deeper into what happens in the generate() method. Its 2nd param $map comes from $log of executed queries. I added a line debug code in to see my values of the query in typeMap() while adding an indexed website into the database (= the values of the given insert in the 1st posting).
The type double is associated to How about setting that line to regards, |
added #1020 |
Information
Describe the Problem
After migrating from 1.x to 2.1,2 the method last() does not work (in my app) anymore. It occurs on PHP 7.4 and 8.0.
Detail Code
after an insert (it was successful) I use
echo $oDB->last();
In #0 the problem is shown: the quote() method got an integer called in generate().
The value 33427 is a value in a databes column "size" which has type "int".
In the source of generate() the value PDO::PARAM_STR seems to catch integer values. In generate the integer values must be handled before a string - or the qote() method must detect an integer.
My fast fix was adding a test
is_integer($value[1])
in the generate() method before handling strings.Expected output
Get a string with last query.
The text was updated successfully, but these errors were encountered: