Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-8.1
/
share
/
test
/
mongodb
/
tests
/
bson
/
//opt/php-8.1/share/test/mongodb/tests/bson/bson-javascript-serialization_error-002.phpt
--TEST-- MongoDB\BSON\Javascript unserialization expects optional scope to be array or object (Serializable interface) --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; echo throws(function() { unserialize('C:23:"MongoDB\BSON\Javascript":64:{a:2:{s:4:"code";s:13:"function() {}";s:5:"scope";s:7:"INVALID";}}'); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected scope to be array or object, string given ===DONE===