|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-20 16:13 UTC] nsadjadi at gmail dot com
[2016-07-10 10:55 UTC] [email protected]
-Package: PDO related
+Package: PDO PgSQL
-Assigned To:
+Assigned To: mbeccati
[2016-07-10 12:40 UTC] [email protected]
[2016-07-10 12:40 UTC] [email protected]
-Status: Assigned
+Status: Closed
[2016-10-17 10:11 UTC] [email protected]
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 11:00:01 2025 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.