1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/session/tests/session_start_error.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

26 lines
488 B
PHP

--TEST--
Test session_start() errors
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
ob_start();
try {
session_start(['option' => new stdClass()]);
} catch (TypeError $exception) {
echo $exception->getMessage() . "\n";
}
var_dump(session_start(['option' => false]));
ob_end_flush();
?>
--EXPECTF--
session_start(): Option "option" must be of type string|int|bool, stdClass given
Warning: session_start(): Setting option "option" failed in %s on line %d
bool(true)