Viewing File: /opt/alt/tests/alt-php80-pecl-mongodb_1.18.1-1.el8/tests/bug0325.phpt
--TEST--
Test for PHPC-325: Memory leak decoding buffers with multiple documents
--FILE--
<?php
require_once __DIR__ . '/../utils/basic.inc';
$bson1 = fromJSON('{"x": "y"}');
$bson2 = fromJSON('{"a": "b"}');
try {
var_dump(toPHP($bson1 . $bson2));
} catch (MongoDB\Driver\Exception\UnexpectedValueException $e) {
echo $e->getMessage(), "\n";
}
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
Reading document did not exhaust input buffer
===DONE===
Back to Directory
File Manager
<