access mode for dbase_open() cannot be < 0

This commit is contained in:
Antony Dovgal 2006-10-10 23:00:48 +00:00
parent 81c149153e
commit ff62076796

View File

@ -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)) {