xref: /PHP-5.4/ext/xmlrpc/tests/bug45555.phpt (revision f38bfa62)
1--TEST--
2Bug #45555 (Segfault with invalid non-string as register_introspection_callback)
3--SKIPIF--
4<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
5--FILE--
6<?php
7
8$options = array ();
9$request = xmlrpc_encode_request ("system.describeMethods", $options);
10$server = xmlrpc_server_create ();
11
12xmlrpc_server_register_introspection_callback($server, 1);
13xmlrpc_server_register_introspection_callback($server, array('foo', 'bar'));
14
15$options = array ('output_type' => 'xml', 'version' => 'xmlrpc');
16xmlrpc_server_call_method ($server, $request, NULL, $options);
17
18?>
19--EXPECTF--
20Warning: xmlrpc_server_call_method(): Invalid callback '1' passed in %s on line %d
21
22Warning: xmlrpc_server_call_method(): Invalid callback 'foo::bar' passed in %s on line %d
23