diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-02-13 01:19:57 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-02-13 01:19:57 +0000 |
commit | 5a38078385281598ff5c4620cc4b9c9f495cc9ba (patch) | |
tree | 0997b293d859c49ef39fb6b4fe8a0c66e053bc0d /ext/fileinfo | |
parent | b93acb023d601429893de77c1c51f7a626fa5dc0 (diff) | |
download | php-git-5a38078385281598ff5c4620cc4b9c9f495cc9ba.tar.gz |
Fixes for PHP 4.3.X.
Diffstat (limited to 'ext/fileinfo')
-rw-r--r-- | ext/fileinfo/fileinfo.c | 10 |
1 files 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) { |