dmitry Tue Jul 6 03:30:33 2004 EDT Added files: /php-src/ext/soap/tests/bugs bug28751.phpt skipif.inc
Modified files: /php-src NEWS /php-src/ext/soap soap.c Log: Fixed bug #28751 (SoapServer does not call _autoload()) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1753&r2=1.1754&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1753 php-src/NEWS:1.1754 --- php-src/NEWS:1.1753 Mon Jul 5 15:36:10 2004 +++ php-src/NEWS Tue Jul 6 03:30:31 2004 @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jul 2004, PHP 5.0.0 +- Fixed bug #28751 (SoapServer does not call _autoload()). (Dmitry) - Updated PCRE to provide better error handling in certain cases. (Andrei) - Changed doc comments to require a single white space after '/**'. (Marcus) - Fixed bug #29019 (Database not closing). (Marcus) http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.107&r2=1.108&ty=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.107 php-src/ext/soap/soap.c:1.108 --- php-src/ext/soap/soap.c:1.107 Mon Jun 21 08:56:33 2004 +++ php-src/ext/soap/soap.c Tue Jul 6 03:30:33 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c,v 1.107 2004/06/21 12:56:33 dmitry Exp $ */ +/* $Id: soap.c,v 1.108 2004/07/06 07:30:33 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -998,8 +998,11 @@ PHP_METHOD(SoapServer, setClass) { soapServicePtr service; +#ifdef ZEND_ENGINE_2 + zend_class_entry **ce; +#else zend_class_entry *ce; - char *class_name = NULL; +#endif int found, argc; zval ***argv; @@ -1016,14 +1019,17 @@ } if (Z_TYPE_PP(argv[0]) == IS_STRING) { - class_name = estrdup(Z_STRVAL_PP(argv[0])); - +#ifdef ZEND_ENGINE_2 + found = zend_lookup_class(Z_STRVAL_PP(argv[0]), Z_STRLEN_PP(argv[0]), &ce); +#else + char *class_name = estrdup(Z_STRVAL_PP(argv[0])); found = zend_hash_find(EG(class_table), php_strtolower(class_name, Z_STRLEN_PP(argv[0])), Z_STRLEN_PP(argv[0]) + 1, (void **)&ce); efree(class_name); +#endif if (found != FAILURE) { service->type = SOAP_CLASS; #ifdef ZEND_ENGINE_2 - service->soap_class.ce = *(zend_class_entry**)ce; + service->soap_class.ce = *ce; #else service->soap_class.ce = ce; #endif http://cvs.php.net/co.php/php-src/ext/soap/tests/bugs/bug28751.phpt?r=1.1&p=1 Index: php-src/ext/soap/tests/bugs/bug28751.phpt +++ php-src/ext/soap/tests/bugs/bug28751.phpt --TEST-- Bug #28751 (SoapServer does not call _autoload()) --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php function __autoload($className) { class SoapServerActions { function test() { return "Hello World"; } } } $server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); $server->setClass("SoapServerActions"); $HTTP_RAW_POST_DATA = <<<EOF <?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:si="http://soapinterop.org/xsd"> <SOAP-ENV:Body> <ns1:test xmlns:ns1="http://testuri.org" /> </SOAP-ENV:Body> </SOAP-ENV:Envelope> EOF; $server->handle(); echo "ok\n"; ?> --EXPECT-- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> ok http://cvs.php.net/co.php/php-src/ext/soap/tests/bugs/skipif.inc?r=1.1&p=1 Index: php-src/ext/soap/tests/bugs/skipif.inc +++ php-src/ext/soap/tests/bugs/skipif.inc <?php if (!extension_loaded('soap')) die('skip soap extension not available'); ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php