* PHP-5.5:
Added type checks
Fixed bug #67741 (auto_prepend_file messes up __LINE__)
Check variable type before its usage as IS_ARRAY.
Fixed a bug that header value is not terminated by '\0' when accessed through getenv().
}
/* Send cookies along with request */
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS) {
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS &&
+ Z_TYPE_PP(cookies) == IS_ARRAY) {
zval **data;
char *key;
+ uint key_len;
int i, n;
has_cookies = 1;