Bug #38546 [Com]: bindParam incorrect processing of bool types
| From: | kernins at gmail dot com | Date: | Tue, 15 Aug 2017 03:37:47 +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-210682@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: kernins at gmail dot com
Reported by: selecter at gmail dot com
Summary: bindParam incorrect processing of bool types
Status: No Feedback
Type: Bug
Package: PDO related
Operating System: Gentoo Linux x86_64
PHP Version: 5.2.4
Assigned To: wez
Block user comment: N
Private report: N
New Comment:
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!
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2007-04-11 15:26:21] tobias dot woell at it-basis dot de
Suggestion for workaround (works with PHP 5.1.6 and MySql 4.1.1):
$tmp = (int) $this->getDue_Date_IsWeek();
$stmt->bindParam(':Due_Date_IsWeek' , $tmp , PDO::PARAM_BOOL );
------------------------------------------------------------------------
[2007-02-06 16:38:58] hans at velum dot net
This looks to be the same issue as: http://pecl.php.net/bugs/bug.php?id=9919
------------------------------------------------------------------------
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