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 @@ -380,7 +380,11 @@ PHPAPI int php_output_get_level(void)
380380PHPAPI int php_output_get_contents (zval * p )
381381{
382382 if (OG (active )) {
383- ZVAL_STRINGL (p , OG (active )-> buffer .data , OG (active )-> buffer .used );
383+ if (OG (active )-> buffer .used ) {
384+ ZVAL_STRINGL (p , OG (active )-> buffer .data , OG (active )-> buffer .used );
385+ } else {
386+ ZVAL_EMPTY_STRING (p );
387+ }
384388 return SUCCESS ;
385389 } else {
386390 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