xref: /PHP-7.2/ext/wddx/tests/bug45901.phpt (revision f1d7e3ca)
1--TEST--
2Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object)
3--SKIPIF--
4<?php
5if (!extension_loaded("wddx")) print "skip";
6if (!extension_loaded("simplexml")) print "skip SimpleXML not present";
7?>
8--FILE--
9<?php
10
11$xml = new SimpleXMLElement('<data></data>');
12$xml->addChild('test');
13echo wddx_serialize_value($xml, 'Variables') . "\n";
14echo "DONE";
15?>
16--EXPECTF--
17Warning: wddx_serialize_value(): Class SimpleXMLElement can not be serialized in %sbug45901.php on line %d
18<wddxPacket version='1.0'><header><comment>Variables</comment></header><data></data></wddxPacket>
19DONE
20