Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f9f3afe

Browse files
committed
#223 #224 Correcting ob_start() callback redundancy, restoring ob_end_flush()
1 parent de11308 commit f9f3afe

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/Response/SapiStreamEmitterTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,20 @@ public function testEmitMemoryUsage($seekable, $maxBufferLength, $sizeBlocks, $m
188188
$response = $response->withHeader('Content-Range', 'bytes ' . $first . '-' . $last . '/*');
189189
}
190190

191-
ob_start(function ($output) use (& $closureTrackMemoryUsage) {
192-
call_user_func($closureTrackMemoryUsage);
193-
return "";
194-
}, $maxBufferLength);
191+
ob_start(
192+
function () use (& $closureTrackMemoryUsage) {
193+
$closureTrackMemoryUsage();
194+
195+
return '';
196+
},
197+
$maxBufferLength
198+
);
195199

196200
gc_collect_cycles();
197201

198202
$this->emitter->emit($response, $maxBufferLength);
199203

200-
ob_end_clean();
204+
ob_end_flush();
201205

202206
gc_collect_cycles();
203207

0 commit comments

Comments
 (0)