|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71941 PDO::ERRMODE_SILENT ignored for "implementation errors"
Submitted: 2016-04-01 12:45 UTC Modified: 2020-12-11 14:45 UTC
Avg. Score:3.5 ± 1.4
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: belliash at asiotec dot eu dot org Assigned:
Status: Verified Package: PDO related
PHP Version: 7.0.5 OS: ALL
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: belliash at asiotec dot eu dot org
New email:
PHP Version: OS:


 [2016-04-01 12:45 UTC] belliash at asiotec dot eu dot org
As you can see in above example ( I am setting PDO::ATTR_ERRMODE to PDO::ERRMODE_SILENT but somehow it does not make $pdo->getAttribute() silent. It is throwing an exception or warning, depending on setting, but it is IMPOSSIBLE to make it silent.

Test script:
$pdo = new \PDO('sqlite::memory:');


Expected result:

Actual result:
Warning: SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute in /in/0hf0u on line 6


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-02 11:18 UTC]
-Status: Open +Status: Verified
 [2016-04-02 11:18 UTC]
Looks intentional, as a strange response to a bug ...

Looks like it has been like that for a long time ... not sure what to do ...
 [2016-04-02 14:49 UTC] belliash at asiotec dot eu dot org
IMHO this is a bug. The behaviour is way different than specified in documentation and thus should be fixed in my opinion.
 [2017-10-24 08:31 UTC]
-Package: PDO Core +Package: PDO related
 [2020-12-11 14:43 UTC]
The problem here is that these kinds of errors don't populate errorInfo(), so the error would get completely lost in SILENT mode.
 [2020-12-11 14:45 UTC]
-Summary: Setting PDO::ATTR_ERRMODE to PDO::ERRMODE_SILENT does NOT work +Summary: PDO::ERRMODE_SILENT ignored for "implementation errors"
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 07:01:29 2024 UTC