diff options
Diffstat (limited to 'ext/sqlite3/sqlite3.c')
-rw-r--r-- | ext/sqlite3/sqlite3.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 741a6ad0c2..d7f7722959 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -124,14 +124,6 @@ PHP_METHOD(sqlite3, open) return; } -#if PHP_API_VERSION < 20100412 - if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - zend_throw_exception_ex(zend_ce_exception, 0, "safe_mode prohibits opening %s", fullpath); - efree(fullpath); - return; - } -#endif - if (php_check_open_basedir(fullpath)) { zend_throw_exception_ex(zend_ce_exception, 0, "open_basedir prohibits opening %s", fullpath); efree(fullpath); @@ -164,11 +156,7 @@ PHP_METHOD(sqlite3, open) db_obj->initialised = 1; -#if PHP_API_VERSION < 20100412 - if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { -#else if (PG(open_basedir) && *PG(open_basedir)) { -#endif sqlite3_set_authorizer(db_obj->db, php_sqlite3_authorizer, NULL); } @@ -695,9 +683,7 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s fake_argc = argc + is_agg; fc->fci.size = sizeof(fc->fci); - fc->fci.function_table = EG(function_table); ZVAL_COPY_VALUE(&fc->fci.function_name, cb); - fc->fci.symbol_table = NULL; fc->fci.object = NULL; fc->fci.retval = &retval; fc->fci.param_count = fake_argc; @@ -854,9 +840,7 @@ static int php_sqlite3_callback_compare(void *coll, int a_len, const void *a, in int ret; collation->fci.fci.size = (sizeof(collation->fci.fci)); - collation->fci.fci.function_table = EG(function_table); ZVAL_COPY_VALUE(&collation->fci.fci.function_name, &collation->cmp_func); - collation->fci.fci.symbol_table = NULL; collation->fci.fci.object = NULL; collation->fci.fci.retval = &retval; collation->fci.fci.param_count = 2; @@ -2011,13 +1995,6 @@ static int php_sqlite3_authorizer(void *autharg, int access_type, const char *ar case SQLITE_ATTACH: { if (memcmp(arg3, ":memory:", sizeof(":memory:")) && *arg3) { - -#if PHP_API_VERSION < 20100412 - if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - return SQLITE_DENY; - } -#endif - if (php_check_open_basedir(arg3)) { return SQLITE_DENY; } |