|
|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsAllCommentsChangesGit/SVN commits
[2015-08-20 16:13 UTC] nsadjadi at gmail dot com
[2016-07-10 10:55 UTC] mbeccati@php.net
-Package: PDO related
+Package: PDO PgSQL
-Assigned To:
+Assigned To: mbeccati
[2016-07-10 12:40 UTC] mbeccati@php.net
[2016-07-10 12:40 UTC] mbeccati@php.net
-Status: Assigned
+Status: Closed
[2016-10-17 10:11 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||||||||
|
All rights reserved. |
Last updated: Fri Apr 10 00:00:01 2026 UTC |
Description: ------------ PDO fails to return SQL errors from PostgreSQL when using an invalid SQL statement and integer based bindParam calls. If you remove the bindParam calls the execute call will throw an exception. Test script: --------------- <?php $dbh = new PDO('###', '###', '###'); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $dbh->prepare(");"); $a = 'a'; $b = 'b'; $stmt->bindParam(1,$a); $stmt->bindParam(2,$b); $stmt->execute(); Expected result: ---------------- An exception should always be thrown when invalid SQL is executed.