]> granicus.if.org Git - php/commitdiff
DB::parseDSN() now checks the value it is passed, and if it is already an
authorChuck Hagenbuch <chagenbu@php.net>
Fri, 30 Jun 2000 19:20:03 +0000 (19:20 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Fri, 30 Jun 2000 19:20:03 +0000 (19:20 +0000)
array, returns it. This lets you pass arrays to the connect functions and
they'll work transparently.

pear/DB.php

index 2cc8016accdbca6e1fb760b438a6c88584452b77..be6ccd4a6d6d43172c7fed5c7d861787294b421c 100644 (file)
@@ -330,6 +330,9 @@ class DB {
         * @return bool FALSE is returned on error
         */
        function parseDSN($dsn) {
+               if (is_array($dsn))
+                       return $dsn;
+               
                $parsed = array(
                        'phptype'  => false,
                        'dbsyntax' => false,