Bug #49320 [NoF->Csd]: PDO returns null when SQLite connection fails
| From: | felipe@php.net | Date: | Sat, 12 Jun 2010 22:05:46 +0000 |
| Subject: | Bug #49320 [NoF->Csd]: PDO returns null when SQLite connection fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151398@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49320&edit=1
ID: 49320
Updated by: felipe@php.net
Reported by: brandon at brandonsavage dot net
Summary: PDO returns null when SQLite connection fails
-Status: No Feedback
+Status: Closed
Type: Bug
Package: PDO related
Operating System: All
PHP Version: 5.2.10
-Assigned To:
+Assigned To: felipe
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-06-13 00:04:50] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=300413
Log: - Fixed bug #49320 (PDO returns null when SQLite connection fails)
------------------------------------------------------------------------
[2009-12-14 01:00:00] 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".
------------------------------------------------------------------------
[2009-12-06 22:15:50] felipe@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-08-21 14:16:08] 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-08-21 13:45:15] brandon at brandonsavage dot net
Description:
------------
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:
---------------
<?php
//Use the wrong driver so the connection fails
$pdo = new PDO('sqlite2:bookstore.db');
var_dump($pdo);
Expected result:
----------------
PDOException
Actual result:
--------------
null
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49320&edit=1