#49320 [NEW]: PDO returns null when SQLite connection fails

From: Date: Fri, 21 Aug 2009 13:45:16 +0000
Subject: #49320 [NEW]: PDO returns null when SQLite connection fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141360@lists.php.net to get a copy of this message
From: brandon at brandonsavage dot net Operating system: All PHP version: 5.2.10 PHP Bug Type: PDO related Bug description: PDO returns null when SQLite connection fails 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 bug report at http://bugs.php.net/?id=49320&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49320&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49320&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49320&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49320&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49320&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49320&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49320&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49320&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49320&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49320&r=support Expected behavior: http://bugs.php.net/fix.php?id=49320&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49320&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49320&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49320&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49320&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49320&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49320&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49320&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49320&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49320&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49320&r=mysqlcfg

« previous php.bugs (#141360) next »