Commit 2d682396 authored by Ezku's avatar Ezku

Fixed sqlite dsn in Doctrine_Manager::parseDsn()

parent 0d67fcaf
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment