1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 15:12:39 +02:00
Files
archived-php-src/ext/xml/tests/bug78563_serialize.phpt
Mark 52376c177d Fix bug #78563
Make XmlParser final, unclonable and unserializable.

Closes GH-4778.
2019-10-07 10:24:41 +02:00

19 lines
368 B
PHP

--TEST--
Bug #78563: parsers should not be serializable
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
$parser = xml_parser_create();
serialize($parser);
?>
===DONE===
--EXPECTF--
Fatal error: Uncaught Exception: Serialization of 'XmlParser' is not allowed in %s:%d
Stack trace:
#0 %s(%d): serialize(Object(XmlParser))
#1 {main}
thrown in %s on line %d