PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Aug 2007, PHP 5.2.4
+- Fixed bug #42183 (classmap cause crashr in non-wsdl mode). (Dmitry)
- Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload,
in the same way as "instanceof" operator). (Dmitry)
- Fixed bug #41904 (proc_open(): empty env array should cause empty
zend_hash_get_current_key_ex(SOAP_GLOBAL(class_map), &type_name, &type_len, &idx, 0, &pos) == HASH_KEY_IS_STRING) {
/* TODO: namespace isn't stored */
- encodePtr enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)->target_ns, type_name);
+ encodePtr enc = NULL;
+ if (SOAP_GLOBAL(sdl)) {
+ enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)->target_ns, type_name);
+ }
if (enc) {
encode = enc;
} else if (SOAP_GLOBAL(sdl)) {
--- /dev/null
+--TEST--
+Bug #42183 (classmap cause crash in non-wsdl mode )
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+class PHPObject {
+}
+
+$req = <<<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.sit.com" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope>
+EOF;
+
+function test() {
+ return new PHPObject();
+}
+
+$server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com',
+ 'classmap' => array('Object' => 'PHPObject')));
+$server->addFunction("test");
+ob_start();
+$server->handle($req);
+ob_end_clean();
+echo "ok\n";
+--EXPECT--
+ok