diff options
author | Remi Collet <remi@php.net> | 2014-12-02 07:05:13 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2014-12-02 07:06:10 +0100 |
commit | 67fc5d6bbb9bd07512d7e0a6866388287a7f9223 (patch) | |
tree | 238f68f5c3ad6c2facc8c4254c302969fa9abc4e /ext/standard/head.c | |
parent | 6ae09ddf4993a5ae362461c05e84076e0e66639d (diff) | |
download | php-git-67fc5d6bbb9bd07512d7e0a6866388287a7f9223.tar.gz |
Fix type of string length in zpp call
Fix 23 failed tests (detected on bigendian)
Diffstat (limited to 'ext/standard/head.c')
-rw-r--r-- | ext/standard/head.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c index 1417b52bc0..28fcb6b686 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -40,11 +40,13 @@ PHP_FUNCTION(header) { zend_bool rep = 1; sapi_header_line ctr = {0}; + size_t len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &ctr.line, - &ctr.line_len, &rep, &ctr.response_code) == FAILURE) + &len, &rep, &ctr.response_code) == FAILURE) return; + ctr.line_len = (uint)len; sapi_header_op(rep ? SAPI_HEADER_REPLACE:SAPI_HEADER_ADD, &ctr TSRMLS_CC); } /* }}} */ @@ -54,11 +56,13 @@ PHP_FUNCTION(header) PHP_FUNCTION(header_remove) { sapi_header_line ctr = {0}; + size_t len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &ctr.line, - &ctr.line_len) == FAILURE) + &len) == FAILURE) return; + ctr.line_len = (uint)len; sapi_header_op(ZEND_NUM_ARGS() == 0 ? SAPI_HEADER_DELETE_ALL : SAPI_HEADER_DELETE, &ctr TSRMLS_CC); } /* }}} */ |