]> granicus.if.org Git - php/commitdiff
Fixed refernce handling
authorXinchen Hui <laruence@php.net>
Sat, 28 Jun 2014 13:09:07 +0000 (21:09 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 28 Jun 2014 13:09:07 +0000 (21:09 +0800)
ext/intl/dateformat/dateformat_parse.c

index 993077854646e8983b1ba64766b545bf8776822e..f981afb6a825464908e256cf81666843ee1241b1 100644 (file)
@@ -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);
        }