Bug #38546 [ReO->Csd]: bindParam incorrect processing of bool types
| From: | nikic@php.net | Date: | Fri, 07 Jun 2019 07:50:04 +0000 |
| Subject: | Bug #38546 [ReO->Csd]: bindParam incorrect processing of bool types | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221179@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
Updated by: nikic@php.net
Reported by: selecter at gmail dot com
Summary: bindParam incorrect processing of bool types
-Status: Re-Opened
+Status: Closed
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:
Automatic comment on behalf of camporter1@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7d1aa7534d756477d45f8fa63b5467589ccca031
Log: Fixed bug #38546
Previous Comments:
------------------------------------------------------------------------
[2019-03-06 06:36:59]
The following pull request has been associated:
Patch Name: pdo_mysql: Fix boolean parameter binds failing when not using emulation.
On GitHub: https://github.com/php/php-src/pull/3921
Patch: https://github.com/php/php-src/pull/3921.patch
------------------------------------------------------------------------
[2019-03-05 19:00:46] henry dot paradiz at gmail dot com
This bug also needs to have PDO::ATTR_EMULATE_PREPARES set to false.
Personally I think it should throw an exception.
------------------------------------------------------------------------
[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".
------------------------------------------------------------------------
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