|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49320 PDO returns null when SQLite connection fails
Submitted: 2009-08-21 13:45 UTC Modified: 2010-06-13 00:05 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: brandon at brandonsavage dot net Assigned: felipe
Status: Closed Package: PDO related
PHP Version: 5.2.10 OS: All
Private report: No CVE-ID:
 [2009-08-21 13:45 UTC] brandon at brandonsavage dot net
The PDO extension should either return an object or throw an exception. However, with PDO and the SQLite driver, this does not happen.

Reproduce code:

//Use the wrong driver so the connection fails
$pdo = new PDO('sqlite2:bookstore.db');


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-21 14:16 UTC] brandon at brandonsavage dot net
The version is mentioned as 5.2.10 but i tested this in 5.3.0 and it exists there as well.
 [2009-12-06 22:15 UTC]
Please try using this snapshot:
For Windows:

 [2009-12-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-06-13 00:04 UTC]
Automatic comment from SVN on behalf of felipe
Log: - Fixed bug #49320 (PDO returns null when SQLite connection fails)
 [2010-06-13 00:05 UTC]
-Status: No Feedback +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-06-13 00:05 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 13:01:30 2015 UTC