|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-18 09:34 UTC] uw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 2025 UTC |
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