Skip to content

Commit

Permalink
Merge branch 'PHP-5.6'
Browse files Browse the repository at this point in the history
Conflicts:
	ext/soap/soap.c
  • Loading branch information
laruence committed Feb 27, 2015
2 parents 8f5676f + 4119879 commit 794a288
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/soap/soap.c
Expand Up @@ -2581,7 +2581,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
}

if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
Z_LVAL_P(trace) > 0) {
Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
add_property_stringl(this_ptr, "__last_request", buf, buf_size);
}

Expand Down Expand Up @@ -2609,7 +2609,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
}
ret = FALSE;
} else if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
Z_LVAL_P(trace) > 0) {
Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
add_property_str(this_ptr, "__last_response", zend_string_copy(Z_STR_P(response)));
}
zval_ptr_dtor(&func);
Expand Down Expand Up @@ -2909,7 +2909,7 @@ PHP_METHOD(SoapClient, __call)

/* Add default headers */
this_ptr = getThis();
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL) {
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL && Z_TYPE_P(tmp) == IS_ARRAY) {
HashTable *default_headers = Z_ARRVAL_P(tmp);
if (soap_headers) {
if (!free_soap_headers) {
Expand Down
17 changes: 17 additions & 0 deletions ext/soap/tests/bugs/bug69085.phpt
@@ -0,0 +1,17 @@
--TEST--
Bug #69085 (SoapClient's __call() type confusion through unserialize())
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
<?php

$dummy = unserialize('O:10:"SoapClient":5:{s:3:"uri";s:1:"a";s:8:"location";s:22:"http://localhost/a.xml";s:17:"__default_headers";i:1337;s:15:"__last_response";s:1:"a";s:5:"trace";s:1:"x";}');
try {
$dummy->whatever();
} catch (Exception $e) {
echo "okey";
}
--EXPECT--
okey

0 comments on commit 794a288

Please sign in to comment.