1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/ext/intl/tests/bug74063.phpt
T
Christoph M. Becker 1468484296 Fix #74063: NumberFormatter fails after retrieval from session
While it would be desireable to actually support unserialization of
NumberFormatter instances, at least we should not allow serialization
for now.

We also remove some doubtful tests, which have been added[1] claiming
that they would crash the intl extension, but apparently no fix has
been applied, and the test cases have not been marked as XFAIL.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=ed793b2a3f857fd49c0c1b036062140da5b3e674>
2020-01-30 10:13:29 +01:00

18 lines
413 B
PHP

--TEST--
Bug #74063 (NumberFormatter fails after retrieval from session)
--SKIPIF--
<?php
if (!extension_loaded('intl')) die('skip intl extension not available');
?>
--FILE--
<?php
$formatter = new NumberFormatter("en_GB", NumberFormatter::CURRENCY);
try {
serialize($formatter);
} catch (Exception $ex) {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Serialization of 'NumberFormatter' is not allowed