@@ -156,7 +156,6 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */
156
156
zend_string * filename ;
157
157
zend_string * contents ;
158
158
bool use_include_path = 0 ;
159
- php_stream * stream ;
160
159
zend_long offset = -1 ;
161
160
zend_long maxlen ;
162
161
bool maxlen_is_null = 1 ;
@@ -190,6 +189,8 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */
190
189
}
191
190
192
191
php_stream_context * context = NULL ;
192
+ php_stream * stream ;
193
+
193
194
if (zcontext ) {
194
195
context = php_stream_context_from_zval (zcontext , 0 );
195
196
}
@@ -232,7 +233,6 @@ PHAR_FUNC(phar_readfile) /* {{{ */
232
233
zend_string * filename ;
233
234
bool use_include_path = 0 ;
234
235
zval * zcontext = NULL ;
235
- php_stream * stream ;
236
236
237
237
if (!PHAR_G (intercepted )) {
238
238
goto skip_phar ;
@@ -251,7 +251,9 @@ PHAR_FUNC(phar_readfile) /* {{{ */
251
251
goto skip_phar ;
252
252
}
253
253
254
- php_stream_context * context = php_stream_context_from_zval (zcontext , 0 );;
254
+ php_stream * stream ;
255
+ php_stream_context * context = php_stream_context_from_zval (zcontext , 0 );
256
+
255
257
stream = php_stream_open_wrapper_ex (ZSTR_VAL (name ), "rb" , 0 | REPORT_ERRORS , NULL , context );
256
258
257
259
zend_string_release_ex (name , false);
@@ -277,7 +279,6 @@ PHAR_FUNC(phar_fopen) /* {{{ */
277
279
size_t mode_len ;
278
280
bool use_include_path = 0 ;
279
281
zval * zcontext = NULL ;
280
- php_stream * stream ;
281
282
282
283
if (!PHAR_G (intercepted )) {
283
284
goto skip_phar ;
@@ -297,7 +298,9 @@ PHAR_FUNC(phar_fopen) /* {{{ */
297
298
goto skip_phar ;
298
299
}
299
300
301
+ php_stream * stream ;
300
302
php_stream_context * context = php_stream_context_from_zval (zcontext , 0 );
303
+
301
304
stream = php_stream_open_wrapper_ex (ZSTR_VAL (name ), mode , 0 | REPORT_ERRORS , NULL , context );
302
305
303
306
zend_string_release_ex (name , false);
0 commit comments