summaryrefslogtreecommitdiff
path: root/ext/dbase/dbase.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dbase/dbase.c')
-rw-r--r--ext/dbase/dbase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index 23fd5eb629..6859ecacec 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -136,7 +136,7 @@ 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) {
+ } else if (Z_LVAL_PP(options) < 0 || Z_LVAL_PP(options) > 3) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid access mode %ld", Z_LVAL_PP(options));
RETURN_FALSE;
}