Req #72653 [Com]: SQLite should allow opening with empty filename

From: Date: Wed, 27 Jul 2016 17:18:16 +0000
Subject: Req #72653 [Com]: SQLite should allow opening with empty filename
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202644@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72653&edit=1 ID: 72653 Comment by: nazar at mokrynskyi dot com Reported by: nazar at mokrynskyi dot com Summary: SQLite should allow opening with empty filename Status: Closed Type: Feature/Change Request Package: SQLite related PHP Version: 7.0.9 Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks for the quick fix! Previous Comments: ------------------------------------------------------------------------ [2016-07-27 17:16:32] cmb@php.net The PR has been merged; closing. ------------------------------------------------------------------------ [2016-07-24 11:36:39] cmb@php.net As Sqlite3 already supports the :memory: pseudo filename, it would make sense to also support empty filenames. BTW: the other bug you're mentioning refers to the SQLite extension, which is unmaintained since a long time anyway. ------------------------------------------------------------------------ [2016-07-22 19:36:38] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72653&edit=1

« previous php.bugs (#202644) next »