Skip to content

Commit 01c0095

Browse files
committed
Print empty string in test for but 77390 just once
1 parent c814b34 commit 01c0095

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/openssl/tests/bug77390.phpt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $clientCode = <<<'CODE'
2323
2424
$read = [$fp];
2525
$buf = '';
26+
$emptyChunkPrinted = false;
2627
$warmedUp = false;
2728
while (stream_select($read, $write, $except, 1000)) {
2829
$chunk = stream_get_contents($fp, 4096);
@@ -37,7 +38,10 @@ $clientCode = <<<'CODE'
3738
phpt_notify('server');
3839
continue;
3940
}
40-
var_dump($chunk);
41+
if ($chunk !== '' || !$emptyChunkPrinted) {
42+
$emptyChunkPrinted = true;
43+
var_dump($chunk);
44+
}
4145
if ($buf === 'hello, world') {
4246
break;
4347
}
@@ -123,5 +127,4 @@ ServerClientTestCase::getInstance()->run($clientCode, [
123127
?>
124128
--EXPECT--
125129
string(0) ""
126-
string(0) ""
127130
string(12) "hello, world"

0 commit comments

Comments
 (0)