diff options
author | Zeev Suraski <zeev@php.net> | 2001-07-31 07:09:49 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-07-31 07:09:49 +0000 |
commit | b1de7fc900766b229f17bf9e1020b5a67b5b0964 (patch) | |
tree | c405a417de3fdafcd98ad8db882b770e96e70d90 /ext | |
parent | bc42c37513a730b0b3ff9cf29e14e45e4ec50c71 (diff) | |
download | php-git-b1de7fc900766b229f17bf9e1020b5a67b5b0964.tar.gz |
More TSRMLS_FETCH annihilation. Enough for today...
Diffstat (limited to 'ext')
-rw-r--r-- | ext/db/db.c | 2 | ||||
-rw-r--r-- | ext/dbase/dbase.c | 4 | ||||
-rw-r--r-- | ext/filepro/filepro.c | 6 | ||||
-rw-r--r-- | ext/gd/gd.c | 10 | ||||
-rw-r--r-- | ext/gd/gd_ctx.c | 2 | ||||
-rw-r--r-- | ext/hyperwave/hw.c | 8 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 4 | ||||
-rw-r--r-- | ext/pgsql/pgsql.c | 2 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 6 | ||||
-rw-r--r-- | ext/standard/basic_functions.h | 2 | ||||
-rw-r--r-- | ext/standard/file.c | 8 | ||||
-rw-r--r-- | ext/standard/ftp_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | ext/standard/http_fopen_wrapper.c | 5 | ||||
-rw-r--r-- | ext/standard/image.c | 2 | ||||
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | ext/standard/php_fopen_wrappers.h | 6 | ||||
-rw-r--r-- | ext/standard/url_scanner_ex.c | 5 | ||||
-rw-r--r-- | ext/zlib/php_zlib.h | 2 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 12 | ||||
-rw-r--r-- | ext/zlib/zlib_fopen_wrapper.c | 4 |
20 files changed, 46 insertions, 48 deletions
diff --git a/ext/db/db.c b/ext/db/db.c index 8a59b91c75..7cdfe7ae63 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -307,7 +307,7 @@ dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC) return NULL; } - if (php_check_open_basedir(filename)) { + if (php_check_open_basedir(filename TSRMLS_CC)) { return NULL; } diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index c9d870a61c..8394720fec 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -132,7 +132,7 @@ PHP_FUNCTION(dbase_open) { RETURN_FALSE; } - if (php_check_open_basedir(dbf_name->value.str.val)) { + if (php_check_open_basedir(dbf_name->value.str.val TSRMLS_CC)) { RETURN_FALSE; } @@ -599,7 +599,7 @@ PHP_FUNCTION(dbase_create) { RETURN_FALSE; } - if (php_check_open_basedir(Z_STRVAL_P(filename))) { + if (php_check_open_basedir(Z_STRVAL_P(filename) TSRMLS_CC)) { RETURN_FALSE; } diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c index a997934bda..ed56136882 100644 --- a/ext/filepro/filepro.c +++ b/ext/filepro/filepro.c @@ -218,7 +218,7 @@ PHP_FUNCTION(filepro) RETURN_FALSE; } - if (php_check_open_basedir(workbuf)) { + if (php_check_open_basedir(workbuf TSRMLS_CC)) { RETURN_FALSE; } @@ -316,7 +316,7 @@ PHP_FUNCTION(filepro_rowcount) RETURN_FALSE; } - if (php_check_open_basedir(workbuf)) { + if (php_check_open_basedir(workbuf TSRMLS_CC)) { RETURN_FALSE; } @@ -540,7 +540,7 @@ PHP_FUNCTION(filepro_retrieve) RETURN_FALSE; } - if (php_check_open_basedir(workbuf)) { + if (php_check_open_basedir(workbuf TSRMLS_CC)) { RETURN_FALSE; } diff --git a/ext/gd/gd.c b/ext/gd/gd.c index e866f57811..6e44cb74f3 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -409,7 +409,7 @@ PHP_FUNCTION(imageloadfont) #ifdef PHP_WIN32 fp = VCWD_FOPEN(Z_STRVAL_PP(file), "rb"); #else - fp = php_fopen_wrapper(Z_STRVAL_PP(file), "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL); + fp = php_fopen_wrapper(Z_STRVAL_PP(file), "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL TSRMLS_CC); #endif if (fp == NULL) { php_error(E_WARNING, "ImageFontLoad: unable to open file"); @@ -1100,7 +1100,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, #ifdef PHP_WIN32 fp = VCWD_FOPEN(fn, "rb"); #else - fp = php_fopen_wrapper(fn, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL); + fp = php_fopen_wrapper(fn, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL TSRMLS_CC); #endif if (!fp && !socketd) { php_strip_url_passwd(fn); @@ -1312,7 +1312,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { php_error(E_WARNING, "%s: invalid filename '%s'", get_active_function_name(TSRMLS_C), fn); RETURN_FALSE; } @@ -3404,13 +3404,13 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) } /* Check origin file */ - if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org)) { + if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) { php_error (E_WARNING, "%s: invalid origin filename '%s'", get_active_function_name(TSRMLS_C), fn_org); RETURN_FALSE; } /* Check destination file */ - if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest)) { + if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) { php_error (E_WARNING, "%s: invalid destination filename '%s'", get_active_function_name(TSRMLS_C), fn_dest); RETURN_FALSE; } diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index b6c5df5986..3c389a38ba 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -49,7 +49,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { php_error(E_WARNING, "%s: invalid filename '%s'", get_active_function_name(TSRMLS_C), fn); RETURN_FALSE; } diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 1f612b5281..fe1eec534a 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -2800,7 +2800,8 @@ PHP_FUNCTION(hw_insertdocument) { /* {{{ proto hwdoc hw_new_document(string objrec, string data, int size) Create a new document */ -PHP_FUNCTION(hw_new_document) { +PHP_FUNCTION(hw_new_document) +{ pval *arg1, *arg2, *arg3; char *ptr; hw_document *doc; @@ -2835,7 +2836,8 @@ PHP_FUNCTION(hw_new_document) { #define BUFSIZE 8192 /* {{{ proto hwdoc hw_new_document_from_file(string objrec, string filename) Create a new document from a file */ -PHP_FUNCTION(hw_new_document_from_file) { +PHP_FUNCTION(hw_new_document_from_file) +{ pval **arg1, **arg2; int len, type; char *ptr; @@ -2854,7 +2856,7 @@ PHP_FUNCTION(hw_new_document_from_file) { convert_to_string_ex(arg1); convert_to_string_ex(arg2); - fp = php_fopen_wrapper((*arg2)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper((*arg2)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp && !socketd){ if (issock != BAD_URL) { char *tmp = estrndup(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2)); diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 593ea10ab0..7ad8eaf90f 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2930,7 +2930,7 @@ PHP_FUNCTION(ocisavelobfile) convert_to_string_ex(arg); - if (php_check_open_basedir((*arg)->value.str.val)) { + if (php_check_open_basedir((*arg)->value.str.val TSRMLS_CC)) { RETURN_FALSE; } @@ -3050,7 +3050,7 @@ PHP_FUNCTION(ociwritelobtofile) } if (filename && *filename) { - if (php_check_open_basedir(filename)) { + if (php_check_open_basedir(filename TSRMLS_CC)) { goto bail; } diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 8ff51b8968..2b3d8b764f 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1436,7 +1436,7 @@ PHP_FUNCTION(pg_trace) ZEND_FETCH_RESOURCE2(pgsql, PGconn *, z_pgsql_link, id, "PostgreSQL link", le_link, le_plink); convert_to_string_ex(z_filename); - fp = php_fopen_wrapper(Z_STRVAL_PP(z_filename), mode, ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper(Z_STRVAL_PP(z_filename), mode, ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp) { php_error(E_WARNING, "Unable to open %s for logging", Z_STRVAL_PP(z_filename)); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8323bfb0f0..f3378da678 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1552,7 +1552,7 @@ PHP_FUNCTION(error_log) headers=Z_STRVAL_PP(emailhead); } - if (_php_error_log(opt_err,message,opt,headers)==FAILURE) { + if (_php_error_log(opt_err, message, opt, headers TSRMLS_CC)==FAILURE) { RETURN_FALSE; } @@ -1560,7 +1560,7 @@ PHP_FUNCTION(error_log) } /* }}} */ -PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers) +PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC) { FILE *logfile; int issock=0, socketd=0;; @@ -1582,7 +1582,7 @@ PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers) return FAILURE; break; case 3: /*save to a file*/ - logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL); + logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL TSRMLS_CC); if(!logfile) { php_error(E_WARNING,"error_log: Unable to write to %s",opt); return FAILURE; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 8fac9cb70e..1364a3b11f 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -122,7 +122,7 @@ typedef unsigned int php_stat_len; typedef int php_stat_len; #endif -PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers); +PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers TSRMLS_DC); #if SIZEOF_INT == 4 /* Most 32-bit and 64-bit systems have 32-bit ints */ diff --git a/ext/standard/file.c b/ext/standard/file.c index 99b94ed3b5..5e84472cd5 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -317,7 +317,7 @@ PHP_FUNCTION(get_meta_tags) } convert_to_string_ex(filename); - md.fp = php_fopen_wrapper((*filename)->value.str.val, "rb", use_include_path|ENFORCE_SAFE_MODE, &md.issock, &md.socketd, NULL); + md.fp = php_fopen_wrapper((*filename)->value.str.val, "rb", use_include_path|ENFORCE_SAFE_MODE, &md.issock, &md.socketd, NULL TSRMLS_CC); if (!md.fp && !md.socketd) { if (md.issock != BAD_URL) { char *tmp = estrndup(Z_STRVAL_PP(filename), Z_STRLEN_PP(filename)); @@ -497,7 +497,7 @@ PHP_FUNCTION(file) } convert_to_string_ex(filename); - fp = php_fopen_wrapper((*filename)->value.str.val,"rb", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper((*filename)->value.str.val,"rb", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp && !socketd) { if (issock != BAD_URL) { char *tmp = estrndup(Z_STRVAL_PP(filename), Z_STRLEN_PP(filename)); @@ -667,7 +667,7 @@ PHP_NAMED_FUNCTION(php_if_fopen) * We need a better way of returning error messages from * php_fopen_wrapper(). */ - fp = php_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp && !socketd) { if (issock != BAD_URL) { char *tmp = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1)); @@ -1629,7 +1629,7 @@ PHP_FUNCTION(readfile) * We need a better way of returning error messages from * php_fopen_wrapper(). */ - fp = php_fopen_wrapper((*arg1)->value.str.val,"rb", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper((*arg1)->value.str.val,"rb", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp && !socketd){ if (issock != BAD_URL) { char *tmp = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1)); diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 1478970b02..f246ffeeab 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -79,7 +79,7 @@ static int php_get_ftp_result(int socketd) /* {{{ php_fopen_url_wrap_ftp */ -FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) +FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC) { FILE *fp=NULL; php_url *resource=NULL; diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index f83fb7b3ae..745e57ff00 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -70,7 +70,7 @@ /* {{{ php_fopen_url_wrap_http */ -FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) +FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC) { FILE *fp=NULL; php_url *resource=NULL; @@ -85,7 +85,6 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, zval *response_header; char *http_header_line; int http_header_line_length, http_header_line_size; - TSRMLS_FETCH(); resource = php_url_parse((char *) path); if (resource == NULL) { @@ -276,7 +275,7 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, if (location[0] != '\0') { zval **response_header_new, *entry, **entryp; - fp = php_fopen_url_wrap_http(location, mode, options, issock, socketd, opened_path); + fp = php_fopen_url_wrap_http(location, mode, options, issock, socketd, opened_path TSRMLS_CC); if (zend_hash_find(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) &response_header_new) == SUCCESS) { entryp = &entry; MAKE_STD_ZVAL(entry); diff --git a/ext/standard/image.c b/ext/standard/image.c index 6294cd60b2..cb93b19b8b 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -436,7 +436,7 @@ PHP_FUNCTION(getimagesize) break; } - fp = php_fopen_wrapper(Z_STRVAL_PP(arg1), "rb", IGNORE_PATH|ENFORCE_SAFE_MODE, &issock, &socketd, NULL); + fp = php_fopen_wrapper(Z_STRVAL_PP(arg1), "rb", IGNORE_PATH|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC); if (!fp && !socketd) { if (issock != BAD_URL) { diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index b5367198e2..068191ee4c 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -33,7 +33,7 @@ /* {{{ php_fopen_url_wrap_php */ -FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) +FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC) { const char *res = path + 6; diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h index 8e4427e8b3..0f873183c0 100644 --- a/ext/standard/php_fopen_wrappers.h +++ b/ext/standard/php_fopen_wrappers.h @@ -23,8 +23,8 @@ #ifndef PHP_FOPEN_WRAPPERS_H #define PHP_FOPEN_WRAPPERS_H -extern FILE *php_fopen_url_wrap_http(char *, char *, int, int *, int *, char **); -extern FILE *php_fopen_url_wrap_ftp(char *, char *, int, int *, int *, char **); -extern FILE *php_fopen_url_wrap_php(char *, char *, int, int *, int *, char **); +FILE *php_fopen_url_wrap_http(char *, char *, int, int *, int *, char ** TSRMLS_DC); +FILE *php_fopen_url_wrap_ftp(char *, char *, int, int *, int *, char ** TSRMLS_DC); +FILE *php_fopen_url_wrap_php(char *, char *, int, int *, int *, char ** TSRMLS_DC); #endif diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index 10abc54506..7746da4c73 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -887,12 +887,9 @@ PHP_RSHUTDOWN_FUNCTION(url_scanner) PHP_MINIT_FUNCTION(url_scanner) { url_adapt_state_ex_t *ctx; - //TSRMLS_FETCH(); ctx = &BG(url_adapt_state_ex); - - ctx->tags = NULL; - + ctx->tags = NULL; REGISTER_INI_ENTRIES(); return SUCCESS; } diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index f0732ded31..d4fe9af97d 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -64,7 +64,7 @@ PHP_FUNCTION(gzinflate); PHP_FUNCTION(gzencode); PHP_FUNCTION(ob_gzhandler); -FILE *zlib_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path); +FILE *zlib_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC); int php_enable_output_compression(int buffer_size); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index e70d9fa49d..45dee37364 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -165,7 +165,7 @@ PHP_MINIT_FUNCTION(zlib) #if HAVE_FOPENCOOKIE if(PG(allow_url_fopen)) { - php_register_url_wrapper("zlib",zlib_fopen_wrapper TSRMLS_CC); + php_register_url_wrapper("zlib", zlib_fopen_wrapper TSRMLS_CC); } #endif @@ -229,12 +229,12 @@ PHP_MINFO_FUNCTION(zlib) /* {{{ php_gzopen_wrapper */ -static gzFile php_gzopen_wrapper(char *path, char *mode, int options) +static gzFile php_gzopen_wrapper(char *path, char *mode, int options TSRMLS_DC) { FILE *f; int issock=0, socketd=0; - f = php_fopen_wrapper(path, mode, options, &issock, &socketd, NULL); + f = php_fopen_wrapper(path, mode, options, &issock, &socketd, NULL TSRMLS_CC); if (!f) { return NULL; @@ -272,7 +272,7 @@ PHP_FUNCTION(gzfile) } convert_to_string_ex(filename); - zp = php_gzopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE); + zp = php_gzopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC); if (!zp) { php_error(E_WARNING,"gzFile(\"%s\") - %s",(*filename)->value.str.val,strerror(errno)); RETURN_FALSE; @@ -332,7 +332,7 @@ PHP_FUNCTION(gzopen) * We need a better way of returning error messages from * php_gzopen_wrapper(). */ - zp = php_gzopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE); + zp = php_gzopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC); if (!zp) { php_error(E_WARNING,"gzopen(\"%s\",\"%s\") - %s", (*arg1)->value.str.val, p, strerror(errno)); @@ -640,7 +640,7 @@ PHP_FUNCTION(readgzfile) * We need a better way of returning error messages from * php_gzopen_wrapper(). */ - zp = php_gzopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE); + zp = php_gzopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC); if (!zp){ php_error(E_WARNING,"ReadGzFile(\"%s\") - %s",(*arg1)->value.str.val,strerror(errno)); RETURN_FALSE; diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index ad87ba705f..f9328025eb 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -59,7 +59,7 @@ static COOKIE_IO_FUNCTIONS_T gz_cookie_functions = , gz_closer }; -FILE *zlib_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) +FILE *zlib_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC) { struct gz_cookie *gc = NULL; FILE *fp; @@ -75,7 +75,7 @@ FILE *zlib_fopen_wrapper(char *path, char *mode, int options, int *issock, int * path++; - fp = php_fopen_wrapper(path, mode, options|IGNORE_URL, &fissock, &fsocketd, NULL); + fp = php_fopen_wrapper(path, mode, options|IGNORE_URL, &fissock, &fsocketd, NULL TSRMLS_CC); if (!fp) { free(gc); |