File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ PHP NEWS
1616- LibXML:
1717 . Fixed bug GH-14563 (Build failure with libxml2 v2.13.0). (nielsdos)
1818
19+ - Output:
20+ . Fixed bug GH-14808 (Unexpected null pointer in Zend/zend_string.h with
21+ empty output buffer). (nielsdos)
22+
1923- PDO:
2024 . Fixed bug GH-14712 (Crash with PDORow access to null property).
2125 (David Carlier)
Original file line number Diff line number Diff line change @@ -360,7 +360,11 @@ PHPAPI int php_output_get_level(void)
360360PHPAPI int php_output_get_contents (zval * p )
361361{
362362 if (OG (active )) {
363- ZVAL_STRINGL (p , OG (active )-> buffer .data , OG (active )-> buffer .used );
363+ if (OG (active )-> buffer .used ) {
364+ ZVAL_STRINGL (p , OG (active )-> buffer .data , OG (active )-> buffer .used );
365+ } else {
366+ ZVAL_EMPTY_STRING (p );
367+ }
364368 return SUCCESS ;
365369 } else {
366370 ZVAL_NULL (p );
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-14808 (Unexpected null pointer in Zend/zend_string.h with empty output buffer)
3+ --FILE--
4+ <?php
5+ var_dump ($ args );
6+ ob_start ('ob_iconv_handler ' );
7+ ob_clean ();
8+ var_dump (ob_get_contents ());
9+ ?>
10+ --EXPECTF--
11+ Warning: Undefined variable $args in %s on line %d
12+ NULL
13+ string(0) ""
You can’t perform that action at this time.
0 commit comments