Bug #38546 [Com]: bindParam incorrect processing of bool types
| From: | henry dot paradiz at gmail dot com | Date: | Tue, 05 Mar 2019 19:00:46 +0000 |
| Subject: | Bug #38546 [Com]: bindParam incorrect processing of bool types | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219852@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=38546&edit=1
ID: 38546
Comment by: henry dot paradiz at gmail dot com
Reported by: selecter at gmail dot com
Summary: bindParam incorrect processing of bool types
Status: Re-Opened
Type: Bug
Package: PDO MySQL
Operating System: Gentoo Linux x86_64
PHP Version: 5.2.4
Block user comment: N
Private report: N
New Comment:
This bug also needs to have PDO::ATTR_EMULATE_PREPARES set to false.
Personally I think it should throw an exception.
Previous Comments:
------------------------------------------------------------------------
[2019-02-01 11:59:18] jh_walker at outlook dot com
Still present in PHP 7.2; how has such a trivial little issue stayed open for over 12 years?
PDO should be able to convert boolean value to integers for passing to MySQL... what's the
point in retaining the
PHP::PARAM_BOOL type if it does not work when passed a boolean
value?
------------------------------------------------------------------------
[2017-08-15 03:37:45] kernins at gmail dot com
Still reproducible on 7.1.8.
Using \PDO::PARAM_BOOL in bindValue() still leads to execute() failing silently, with no exception
being thrown. From mysql side, stmt just gets closed without being executed.
>PDOStatement::execute() fails because MySQL API doesn't support boolean parameters
I, as a user of PDO, shouldn't care about such details at all. Otherwise, what's a point
in using it? If bools aren't supported by mysql API, then PDO should either convert to int, or
throw an exception.
Trivial bug. More that 10 yrs. Still not fixed.
Shame on you!
------------------------------------------------------------------------
[2009-05-03 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-04-25 14:38:49] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2007-09-05 14:02:29] jani@php.net
Fixed the version number. Please don't invent your own versions. The first char in the version
field is supposed to be the major version number!! I'm assuming this still exist in PHP 5.2.4.
If not, close this.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=38546
--
Edit this bug report at https://bugs.php.net/bug.php?id=38546&edit=1