return the actual zval instead of a string cast as header if join==0
authorMichael Wallner <mike@php.net>
Tue, 24 Jan 2012 16:33:49 +0000 (16:33 +0000)
committerMichael Wallner <mike@php.net>
Tue, 24 Jan 2012 16:33:49 +0000 (16:33 +0000)
php_http_message.c

index 6436a1cf6a913ec45faec3b8f7a611af8a87439e..b3adb46911e79ef46281e50f3a68f38d116f9335 100644 (file)
@@ -169,7 +169,8 @@ PHP_HTTP_API zval *php_http_message_header(php_http_message_t *msg, char *key_st
                        ZVAL_STRINGL(header_str, PHP_HTTP_BUFFER_VAL(&str), PHP_HTTP_BUFFER_LEN(&str), 0);
                        ret = header_str;
                } else {
-                       ret = php_http_ztyp(IS_STRING, *header);
+                       Z_ADDREF_PP(header);
+                       ret = *header;
                }
        }