diff options
| -rw-r--r-- | ext/pdo/tests/bug_44159.phpt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt index d78b12fb91..9f1961c267 100644 --- a/ext/pdo/tests/bug_44159.phpt +++ b/ext/pdo/tests/bug_44159.phpt @@ -4,14 +4,14 @@ Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)) <?php # vim:ft=php if (!extension_loaded('pdo')) die('skip PDO not available'); try { - $pdo = new PDO("sqlite:/tmp/foo.db"); + $pdo = new PDO("sqlite:".__DIR__."/foo.db"); } catch (Exception $e) { die("skip PDP_SQLITE not available"); } ?> --FILE-- <?php -$pdo = new PDO("sqlite:/tmp/foo.db"); +$pdo = new PDO("sqlite:".__DIR__."/foo.db"); $attrs = array(PDO::ATTR_STATEMENT_CLASS, PDO::ATTR_STRINGIFY_FETCHES, PDO::NULL_TO_STRING); @@ -21,6 +21,8 @@ foreach ($attrs as $attr) { var_dump($pdo->setAttribute($attr, 'nonsense')); } +@unlink(__DIR__."/foo.db"); + ?> --EXPECTF-- Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d |
