Skip to content

Commit c83bdb8

Browse files
committed
Make test case more resilient
When ran from a root directory the test case failed, because the open_basedir restriction for "../[…]" won't kick in. Therefore we change the current working directory to the test case's directory, as discussed on internals, see <http://news.php.net/php.internals/95585>.
1 parent 5efd2a3 commit c83bdb8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/sqlite3/tests/sqlite3_21_security.phpt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ SQLite3 open_basedir checks
66
open_basedir=.
77
--FILE--
88
<?php
9+
chdir(__DIR__);
10+
911
$directory = dirname(__FILE__) . '/';
1012
$file = uniqid() . '.db';
1113

0 commit comments

Comments
 (0)