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;
}
Warning: dbase_open(): Invalid access mode -1 %s in %s on line %d
bool(false)
-Warning: dbase_open(): unable to open database %s in %s on line %d
+Warning: dbase_open(): Invalid access mode 1000 in %s on line %d
bool(false)
Warning: dbase_open(): unable to open database %s in %s on line %d