From 67fc5d6bbb9bd07512d7e0a6866388287a7f9223 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 2 Dec 2014 07:05:13 +0100 Subject: Fix type of string length in zpp call Fix 23 failed tests (detected on bigendian) --- ext/standard/head.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ext/standard/head.c') 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); } /* }}} */ -- cgit v1.2.1