]> granicus.if.org Git - php/commitdiff
extra paranoia about the attribute param
authorWez Furlong <wez@php.net>
Thu, 7 Jul 2005 13:56:09 +0000 (13:56 +0000)
committerWez Furlong <wez@php.net>
Thu, 7 Jul 2005 13:56:09 +0000 (13:56 +0000)
ext/pdo/tests/pdo_test.inc

index b571cab60b77844815b786a2eca58791d7819cac..7669b93c4627a94b5bd4d57cd946fdc86c39b9cc 100644 (file)
@@ -9,12 +9,12 @@ class PDOTest {
                $user = getenv('PDOTEST_USER');
                $pass = getenv('PDOTEST_PASS');
                $attr = getenv('PDOTEST_ATTR');
-               if (is_string($attr)) {
+               if (is_string($attr) && strlen($attr)) {
                        $attr = unserialize($attr);
                } else {
                        $attr = null;
                }
-
+               
                $db = new $classname($dsn, $user, $pass, $attr);
 
                // clean up any crufty test tables we might have left behind