#49258 [Opn->Csd]: PDO MySQL execute(array) causes CGI/FastCGI crash
| From: | uw@php.net | Date: | Fri, 18 Sep 2009 09:34:47 +0000 |
| Subject: | #49258 [Opn->Csd]: PDO MySQL execute(array) causes CGI/FastCGI crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142498@lists.php.net to get a copy of this message | ||
ID: 49258
Updated by: uw@php.net
Reported By: grzegorz at heex dot pl
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: Win XP Sp3
PHP Version: 5.3.0
New Comment:
Closing in favour of http://bugs.php.net/bug.php?id=49262 .
This one is a duplicate because: PDO emulation used, no type specified
= default to type string = #49262 scenario.
Previous Comments:
------------------------------------------------------------------------
[2009-08-14 17:40:34] grzegorz at heex dot pl
Description:
------------
PHP crashes if there is no PDO_Type of param
Reproduce code:
---------------
$pdo = new
PDO("mysql:host=localhost;dbname=[base];",'[user]','[pass]');
$sth = $pdo->prepare("SELECT * FROM lng WHERE lng_id=:Id");
$id = 1;
//causes PHP crash
$sth->execute(array(':Id'=>$id));
//OR
//$sth->bindParam(':Id',$id);$sth->execute();
//works fine:
//$sth->bindValue(':Id',$id,PDO::PARAM_INT);
//$sth->execute();
die('OK');
Expected result:
----------------
OK
Actual result:
--------------
PHP CGI/FastCGI crash
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49258&edit=1