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 @@ -360,7 +360,11 @@ PHPAPI int php_output_get_level(void)
360
360
PHPAPI int php_output_get_contents (zval * p )
361
361
{
362
362
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
+ }
364
368
return SUCCESS ;
365
369
} else {
366
370
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