1
0
mirror of synced 2025-02-20 14:13:15 +03:00

Fixed sqlite dsn in Doctrine_Manager::parseDsn()

This commit is contained in:
Ezku 2008-03-28 16:25:32 +00:00
parent 0d67fcaf6d
commit 2d68239681

View File

@ -417,8 +417,12 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
public function parseDsn($dsn)
{
// fix sqlite dsn so that it will parse correctly
$dsn = str_replace("////", "/", $dsn);
$dsn = str_replace("///c:/", "//c:/", $dsn);
if (false !== strpos($dsn, ':///')) {
// replace windows directory separators
$dsn = str_replace("\\", "/", $dsn);
// replace file:/// format with parse_url()-compatible file://
$dsn = str_replace(":///", "://", $dsn);
}
// silence any warnings
$parts = @parse_url($dsn);