Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-8.3.6-202404181513
/
share
/
test
/
mongodb
/
tests
/
logging
/
//opt/php-8.3.6-202404181513/share/test/mongodb/tests/logging/mongoc_log_error-003.phpt
--TEST-- MongoDB\Driver\Monitoring\mongoc_log(): Message contains null bytes --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; use MongoDB\Driver\Monitoring\LogSubscriber; use function MongoDB\Driver\Monitoring\mongoc_log; echo throws(function() { mongoc_log(LogSubscriber::LEVEL_ERROR, 'domain', "message\0"); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Message cannot contain null bytes. Unexpected null byte after "message". ===DONE===