Permalink
Browse files

Handle non-array hdrs param

  • Loading branch information...
1 parent ff0ec84 commit b5a6942c7787270927fbc1399177ddc2b7d61bd5 @johnj committed Dec 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 xcom.c
View
@@ -429,7 +429,7 @@ static void* php_xcom_send_msg_common(INTERNAL_FUNCTION_PARAMETERS, int async) {
snprintf(auth_hdr, sizeof(auth_hdr), "Authorization: %s", xcom->cap_token);
}
- if(!hdrs || SUCCESS!=zend_hash_find(HASH_OF(hdrs), "X-XC-SCHEMA-VERSION", sizeof("X-XC-SCHEMA-VERSION"), (void *)&tmp)) {
+ if(!hdrs || Z_TYPE_P(hdrs)!=IS_ARRAY || SUCCESS!=zend_hash_find(HASH_OF(hdrs), "X-XC-SCHEMA-VERSION", sizeof("X-XC-SCHEMA-VERSION"), (void *)&tmp)) {
snprintf(schema_ver_hdr, sizeof(schema_ver_hdr), "X-XC-SCHEMA-VERSION: %s", "1.0.0");
}

0 comments on commit b5a6942

Please sign in to comment.