Skip to content

Commit 60fe78a

Browse files
committed
Add regression tests for bug #79836
Co-authored-by: [email protected]
1 parent 92b6bce commit 60fe78a

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Zend/tests/bug79836.phpt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Bug #79836 (Segfault in concat_function)
3+
--INI--
4+
error_reporting = E_ALL & ~E_WARNING
5+
--FILE--
6+
<?php
7+
ob_start ( function () use ( & $c ) { $c = 0 ;}, 1 );
8+
$c .= [];
9+
$c .= [];
10+
ob_end_clean();
11+
echo "Done\n";
12+
?>
13+
--EXPECT--
14+
Done

Zend/tests/bug79836_1.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #79836 (Segfault in concat_function)
3+
--INI--
4+
error_reporting = E_ALL & ~E_WARNING
5+
--FILE--
6+
<?php
7+
$x = 'non-empty';
8+
ob_start ( function () use ( & $x ) { $x = 0 ;}, 1 );
9+
$c = [];
10+
$x = $c . $x;
11+
$x = $c . $x;
12+
ob_end_clean();
13+
echo "Done\n";
14+
?>
15+
--EXPECT--
16+
Done

0 commit comments

Comments
 (0)