From 5a38078385281598ff5c4620cc4b9c9f495cc9ba Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 13 Feb 2004 01:19:57 +0000 Subject: [PATCH] Fixes for PHP 4.3.X. --- ext/fileinfo/fileinfo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 958df0c5e5..e42985012e 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -119,10 +119,10 @@ function_entry finfo_class_functions[] = { #else -#define FINFO_REGISTER_OBJECT(_object, _ptr) {} -#define FINFO_FROM_OBJECT(socket_id, object) {} +#define FILEINFO_REGISTER_OBJECT(_object, _ptr) {} +#define FILEINFO_FROM_OBJECT(socket_id, object) {} -#define FINFO_DECLARE_INIT_OBJECT(object) +#define FILEINFO_DECLARE_INIT_OBJECT(object) #define object 0 #endif @@ -351,7 +351,11 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode) char *tmp2; php_stream_wrapper *wrap = php_stream_locate_url_wrapper(buffer, &tmp2, 0 TSRMLS_DC); if (wrap && wrap->is_url) { +#ifdef ZEND_ENGINE_2 php_stream_context *context = php_stream_context_from_zval(zcontext, 0); +#else + php_stream_context *context = NULL; +#endif php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); if (!stream) { -- 2.40.0