From d01e06e18a96dc6c2844198ee67e77ab7021456b Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 28 Jun 2014 21:09:07 +0800 Subject: [PATCH] Fixed refernce handling --- ext/intl/dateformat/dateformat_parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 9930778546..f981afb6a8 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -182,7 +182,8 @@ PHP_FUNCTION(datefmt_localtime) /* Fetch the object. */ DATE_FORMAT_METHOD_FETCH_OBJECT; - if(z_parse_pos) { + if (z_parse_pos) { + ZVAL_DEREF(z_parse_pos); convert_to_long(z_parse_pos); parse_pos = (int32_t)Z_LVAL_P(z_parse_pos); if(parse_pos > text_len) { @@ -190,7 +191,7 @@ PHP_FUNCTION(datefmt_localtime) } } internal_parse_to_localtime( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC); - if(z_parse_pos) { + if (z_parse_pos) { zval_dtor(z_parse_pos); ZVAL_LONG(z_parse_pos, parse_pos); } -- 2.50.1