Skip to content

Commit 45b6099

Browse files
committed
ext/zlib: use new helper macro to fetch default stream context
1 parent b2b747b commit 45b6099

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/zlib/zlib.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ PHP_FUNCTION(gzfile)
622622
}
623623

624624
/* using a stream here is a bit more efficient (resource wise) than php_gzopen_wrapper */
625-
stream = php_stream_gzopen(NULL, filename, "rb", flags, NULL, php_stream_context_from_zval(NULL, false) STREAMS_CC);
625+
stream = php_stream_gzopen(NULL, filename, "rb", flags, NULL, php_stream_context_get_default(false) STREAMS_CC);
626626

627627
if (!stream) {
628628
/* Error reporting is already done by stream code */
@@ -660,7 +660,7 @@ PHP_FUNCTION(gzopen)
660660
flags |= USE_PATH;
661661
}
662662

663-
stream = php_stream_gzopen(NULL, filename, mode, flags, NULL, php_stream_context_from_zval(NULL, false) STREAMS_CC);
663+
stream = php_stream_gzopen(NULL, filename, mode, flags, NULL, php_stream_context_get_default(false) STREAMS_CC);
664664

665665
if (!stream) {
666666
RETURN_FALSE;
@@ -687,7 +687,7 @@ PHP_FUNCTION(readgzfile)
687687
flags |= USE_PATH;
688688
}
689689

690-
stream = php_stream_gzopen(NULL, filename, "rb", flags, NULL, php_stream_context_from_zval(NULL, false) STREAMS_CC);
690+
stream = php_stream_gzopen(NULL, filename, "rb", flags, NULL, php_stream_context_get_default(false) STREAMS_CC);
691691

692692
if (!stream) {
693693
RETURN_FALSE;

0 commit comments

Comments
 (0)