From d5248f67b58ac3107fec82c5b937fc3f4c89784a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 2 Mar 2015 12:27:36 +0300 Subject: [PATCH] Check variable type before its usage as IS_ARRAY. --- ext/soap/soap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index eaa57d9032..8790605f8e 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2884,7 +2884,8 @@ PHP_METHOD(SoapClient, __call) } /* Add default headers */ - if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"), (void **) &tmp)==SUCCESS) { + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"), (void **) &tmp)==SUCCESS && + Z_TYPE_PP(tmp) == IS_ARRAY) { HashTable *default_headers = Z_ARRVAL_P(*tmp); if (soap_headers) { if (!free_soap_headers) { -- 2.40.0