SQLite should allow opening with empty filename
| Request #72653 | SQLite should allow opening with empty filename | ||||
|---|---|---|---|---|---|
| Submitted: | 2016-07-22 19:36 UTC | Modified: | 2016-07-27 17:16 UTC | ||
| From: | nazar at mokrynskyi dot com | Assigned: | cmb (profile) | ||
| Status: | Closed | Package: | SQLite related | ||
| PHP Version: | 7.0.9 | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2016-07-22 19:36 UTC] nazar at mokrynskyi dot com
Description: ------------ SQLite allows to open database with empty filename (https://www.sqlite.org/c3ref/open.html): > If the filename is an empty string, then a private, temporary on-disk database will be created. This private database will be automatically deleted as soon as the database connection is closed. This is also true for HHVM implementation: https://github.com/facebook/hhvm/issues/7225 Would be nice to be consistent and add support for this in PHP as well (especially, since underlying interface already have it). P.S. https://bugs.php.net/bug.php?id=27928 doesn't seem to be relevant here anymore Test script: --------------- <?php new SQLite3(''); Expected result: ---------------- No output Actual result: -------------- PHP Fatal error: Uncaught Exception: Unable to expand filepath in %s:2 Stack trace: #0 %s(2): SQLite3->__construct('') #1 {main} thrown in %s on line 2
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2016-07-24 11:36 UTC] cmb@php.net
-Package: SQLite +Package: SQLite related -Assigned To: +Assigned To: cmb
[2016-07-24 11:36 UTC] cmb@php.net
[2016-07-27 17:16 UTC] cmb@php.net
-Status: Assigned +Status: Closed
[2016-07-27 17:16 UTC] cmb@php.net
[2016-07-27 17:18 UTC] nazar at mokrynskyi dot com