File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ PHP NEWS
66 . Fixed bug GH-17984 (calls with arguments as array with references).
77 (David Carlier)
88
9+ - Mbstring:
10+ . Fixed bug GH-17989 (mb_output_handler crash with unset
11+ http_output_conv_mimetypes). (nielsdos)
12+
913- Treewide:
1014 . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos)
1115
Original file line number Diff line number Diff line change @@ -1567,7 +1567,9 @@ PHP_FUNCTION(mb_output_handler)
15671567 char * mimetype = NULL ;
15681568
15691569 /* Analyze mime type */
1570- if (SG (sapi_headers ).mimetype && _php_mb_match_regex (MBSTRG (http_output_conv_mimetypes ), SG (sapi_headers ).mimetype , strlen (SG (sapi_headers ).mimetype ))) {
1570+ if (SG (sapi_headers ).mimetype
1571+ && MBSTRG (http_output_conv_mimetypes )
1572+ && _php_mb_match_regex (MBSTRG (http_output_conv_mimetypes ), SG (sapi_headers ).mimetype , strlen (SG (sapi_headers ).mimetype ))) {
15711573 char * s ;
15721574 if ((s = strchr (SG (sapi_headers ).mimetype , ';' )) == NULL ) {
15731575 mimetype = estrdup (SG (sapi_headers ).mimetype );
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes)
3+ --EXTENSIONS--
4+ mbstring
5+ --INI--
6+ mbstring.http_output_conv_mimetypes=
7+ --FILE--
8+ <?php
9+ echo "set mime type via this echo \n" ;
10+ ob_start ('mb_output_handler ' );
11+ echo "hi " ;
12+ ob_flush ();
13+ ?>
14+ --EXPECT--
15+ set mime type via this echo
16+ hi
You can’t perform that action at this time.
0 commit comments