xref: /PHP-7.0/ext/wddx/tests/bug45901.phpt (revision 8c67460a)
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--
17
18Warning: wddx_serialize_value(): Class SimpleXMLElement can not be serialized in %sbug45901.php on line %d
19<wddxPacket version='1.0'><header><comment>Variables</comment></header><data></data></wddxPacket>
20DONE