From: Wez Furlong Date: Thu, 7 Jul 2005 13:56:09 +0000 (+0000) Subject: extra paranoia about the attribute param X-Git-Tag: php-5.1.0b3~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1095da42e008c025fd04283e8a637c631455926c;p=php extra paranoia about the attribute param --- diff --git a/ext/pdo/tests/pdo_test.inc b/ext/pdo/tests/pdo_test.inc index b571cab60b..7669b93c46 100644 --- a/ext/pdo/tests/pdo_test.inc +++ b/ext/pdo/tests/pdo_test.inc @@ -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