Bug #68393 [NEW]: PDO Does Not Produce Exception For 'sqlite:' With Missing Filepath

From: Date: Mon, 10 Nov 2014 21:59:10 +0000
Subject: Bug #68393 [NEW]: PDO Does Not Produce Exception For 'sqlite:' With Missing Filepath
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188543@lists.php.net to get a copy of this message
From:             kyra at existing dot me
Operating system: Linux
PHP version:      5.6.2
Package:          PDO SQLite
Bug Type:         Bug
Bug description:PDO Does Not Produce Exception For 'sqlite:' With Missing Filepath

Description:
------------
I was passing the SQLite filepath portion of the DSN as a variable and
happened to pass an empty string, but PDO did not raise an Exception,
and gave no indication the connection had failed.

If you check out http://3v4l.org/o1k3M you can see at some point
after
PHP 5.2.14 that this behavior began.

Test script:
---------------
$db = new PDO('sqlite:');

Expected result:
----------------
Fatal error: Uncaught exception 'PDOException' with message...


-- 
Edit bug report at https://bugs.php.net/bug.php?id=68393&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=68393&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=68393&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=68393&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=68393&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=68393&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=68393&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=68393&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=68393&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=68393&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=68393&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=68393&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=68393&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=68393&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68393&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=68393&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=68393&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=68393&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68393&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=68393&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=68393&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#188543) next »