File tree 3 files changed +22
-1
lines changed 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ PHP NEWS
16
16
- LibXML:
17
17
. Fixed bug GH-14563 (Build failure with libxml2 v2.13.0). (nielsdos)
18
18
19
+ - Output:
20
+ . Fixed bug GH-14808 (Unexpected null pointer in Zend/zend_string.h with
21
+ empty output buffer). (nielsdos)
22
+
19
23
- PDO:
20
24
. Fixed bug GH-14712 (Crash with PDORow access to null property).
21
25
(David Carlier)
Original file line number Diff line number Diff line change @@ -380,7 +380,11 @@ PHPAPI int php_output_get_level(void)
380
380
PHPAPI int php_output_get_contents (zval * p )
381
381
{
382
382
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
+ }
384
388
return SUCCESS ;
385
389
} else {
386
390
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