mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
access mode for dbase_open() cannot be < 0
This commit is contained in:
parent
81c149153e
commit
ff62076796
@ -131,6 +131,9 @@ PHP_FUNCTION(dbase_open)
|
||||
if (Z_LVAL_PP(options) == 1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open %s in write-only mode", Z_STRVAL_PP(dbf_name));
|
||||
RETURN_FALSE;
|
||||
} else if (Z_LVAL_PP(options) < 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid access mode %ld", Z_LVAL_PP(options));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir(Z_STRVAL_PP(dbf_name) TSRMLS_CC)) {
|
||||
|
Loading…
Reference in New Issue
Block a user