|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-20 20:05 UTC] rcrowell at nextjump dot com
[2017-04-01 21:24 UTC] tpunt@php.net
-Package: PDO_DBLIB
+Package: PDO DBlib
[2017-04-10 21:15 UTC] adambaratz@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: adambaratz
[2017-04-10 21:15 UTC] adambaratz@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
Description: ------------ The PDO driver ignores the ATTR_ERRMODE attribute when it is passed in via the constructor. Exceptions are thrown correctly when attributes are set via setAttribute(). Reproduce code: --------------- $connection = new PDO($url, $username, $password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); $connection->prepare("SELECT 10 +"); $query->execute(); Expected result: ---------------- Exception thrown. Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 20018 Incorrect syntax near '+'. [20018] (severity 5) [(null)]' Actual result: -------------- No exception thrown.