diff options
Diffstat (limited to 'ext/readline/tests/readline_write_history_open_basedir_001.phpt')
-rw-r--r-- | ext/readline/tests/readline_write_history_open_basedir_001.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/readline/tests/readline_write_history_open_basedir_001.phpt b/ext/readline/tests/readline_write_history_open_basedir_001.phpt new file mode 100644 index 0000000000..bd7880bb9b --- /dev/null +++ b/ext/readline/tests/readline_write_history_open_basedir_001.phpt @@ -0,0 +1,17 @@ +--TEST-- +readline_write_history(): Test that open_basedir is respected +--SKIPIF-- +<?php if (!extension_loaded("readline") || !function_exists('readline_write_history')) die("skip"); ?> +--INI-- +open_basedir=/tmp/some-sandbox +--FILE-- +<?php + +$name = '/tmp/out-of-sandbox'; + +var_dump(readline_write_history($name)); + +?> +--EXPECTF-- +Warning: readline_write_history(): open_basedir restriction in effect. File(/tmp/out-of-sandbox) is not within the allowed path(s): (/tmp/some-sandbox) in %s on line %d +bool(false)
\ No newline at end of file |