Check variable type before its usage as IS_ARRAY.

This commit is contained in:
Dmitry Stogov 2015-03-02 12:27:36 +03:00
parent 8584cc010a
commit d5248f67b5

View File

@ -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) {