diff options
Diffstat (limited to 'ext/readline/readline.c')
-rw-r--r-- | ext/readline/readline.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 3b72e9ee09..84b5bd3d66 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -402,12 +402,13 @@ PHP_FUNCTION(readline_read_history) return; } - if (php_check_open_basedir(arg)) { + if (arg && php_check_open_basedir(arg)) { RETURN_FALSE; } /* XXX from & to NYI */ if (read_history(arg)) { + /* If filename is NULL, then read from `~/.history' */ RETURN_FALSE; } else { RETURN_TRUE; @@ -426,7 +427,7 @@ PHP_FUNCTION(readline_write_history) return; } - if (php_check_open_basedir(arg)) { + if (arg && php_check_open_basedir(arg)) { RETURN_FALSE; } |