]> granicus.if.org Git - php/commitdiff
- Fixed build using g++ (which complains about jump that crosses initialization)
authorFelipe Pena <felipensp@gmail.com>
Sun, 20 May 2012 19:17:17 +0000 (16:17 -0300)
committerFelipe Pena <felipensp@gmail.com>
Sun, 20 May 2012 19:17:17 +0000 (16:17 -0300)
ext/intl/calendar/calendar_methods.cpp

index fc0a3064d2240138e98eb9e4aa43e068cf0440c8..1e8c9e7fefd35f73aeaea80c84ae218ef1ef4d76 100644 (file)
@@ -1118,6 +1118,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
        int                             locale_str_len;
        TimeZone                *timeZone;
        UErrorCode              status                          = U_ZERO_ERROR;
+       Calendar        *cal;
        intl_error_reset(NULL TSRMLS_CC);
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|s!",
@@ -1172,7 +1173,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
                locale_str = const_cast<char*>(intl_locale_get_default(TSRMLS_C));
        }
 
-       Calendar *cal = Calendar::createInstance(timeZone,
+       cal = Calendar::createInstance(timeZone,
                Locale::createFromName(locale_str), status);
        if (cal == NULL) {
                delete timeZone;