dmitry          Thu Nov 27 11:25:52 2008 UTC

  Modified files:              
    /php-src/ext/soap   soap.c 
    /php-src/ext/soap/tests/bugs        bug46427.phpt 
  Log:
  Fixed bug #46427 (SoapClient() stumbles over its "stream_context" parameter)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.255&r2=1.256&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.255 php-src/ext/soap/soap.c:1.256
--- php-src/ext/soap/soap.c:1.255       Mon Nov 17 11:26:23 2008
+++ php-src/ext/soap/soap.c     Thu Nov 27 11:25:52 2008
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: soap.c,v 1.255 2008/11/17 11:26:23 felipe Exp $ */
+/* $Id: soap.c,v 1.256 2008/11/27 11:25:52 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2862,6 +2862,7 @@
                if (zend_ascii_hash_find(ht, "stream_context", 
sizeof("stream_context"), (void**)&tmp) == SUCCESS &&
                                Z_TYPE_PP(tmp) == IS_RESOURCE) {
                        context = php_stream_context_from_zval(*tmp, 1);
+                       zend_list_addref(context->rsrc_id);
                }
 
                if (zend_ascii_hash_find(ht, "location", sizeof("location"), 
(void**)&tmp) == SUCCESS &&
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug46427.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/soap/tests/bugs/bug46427.phpt
diff -u /dev/null php-src/ext/soap/tests/bugs/bug46427.phpt:1.2
--- /dev/null   Thu Nov 27 11:25:52 2008
+++ php-src/ext/soap/tests/bugs/bug46427.phpt   Thu Nov 27 11:25:52 2008
@@ -0,0 +1,20 @@
+--TEST--
+Bug #46427 (SoapClient() stumbles over its "stream_context" parameter)
+--FILE--
+<?php
+error_reporting(E_ALL|E_STRICT);
+
+function getSoapClient_1() {
+    $ctx = stream_context_create();
+    return new SoapClient(NULL, array(
+       'stream_context' => $ctx,
+       'location' => 'test://',
+       'uri' => 'test://',
+       'exceptions' => false));
+}
+
+getSoapClient_1()->__soapCall('Help', array());
+echo "ok\n";
+?>
+--EXPECT--
+ok



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to