From: Xinchen Hui Date: Sat, 28 Jun 2014 13:09:07 +0000 (+0800) Subject: Fixed refernce handling X-Git-Tag: POST_PHPNG_MERGE~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d01e06e18a96dc6c2844198ee67e77ab7021456b;p=php Fixed refernce handling --- 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); }