php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49258 PDO MySQL execute(array) causes CGI/FastCGI crash
Submitted: 2009-08-14 17:40 UTC Modified: 2009-09-18 09:34 UTC
From: grzegorz at heex dot pl Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3.0 OS: Win XP Sp3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: grzegorz at heex dot pl
New email:
PHP Version: OS:

 

 [2009-08-14 17:40 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 09:34 UTC] uw@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 29 02:01:28 2024 UTC