Skip to content

Commit

Permalink
Handle non-array hdrs param
Browse files Browse the repository at this point in the history
  • Loading branch information
johnj committed Dec 17, 2012
1 parent ff0ec84 commit b5a6942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xcom.c
Expand Up @@ -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");
}

Expand Down

0 comments on commit b5a6942

Please sign in to comment.