summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2013-08-20 09:06:13 +0200
committerOndřej Surý <ondrej@sury.org>2013-08-20 09:06:13 +0200
commitbf4af35254bfff38b18848b86bb2bf7cf11085de (patch)
tree4357e214a9bbaea82dc6bd318cf2ddaa4c7ba01c /ext/date
parentd837b4550418036e76d6adb3c7dad94b1e3a5a6a (diff)
downloadphp-bf4af35254bfff38b18848b86bb2bf7cf11085de.tar.gz
New upstream version 5.5.2+dfsgupstream/5.5.2+dfsg
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/php_date.c8
-rw-r--r--ext/date/php_date.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 0f8822a90..f0c9525e5 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1041,7 +1041,7 @@ char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
static char *date_format(char *format, int format_len, timelib_time *t, int localtime)
{
smart_str string = {0};
- int i, length;
+ int i, length = 0;
char buffer[97];
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
@@ -1396,7 +1396,7 @@ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb)
}
/* }}} */
-/* {{{ php_parse_date: Backwards compability function */
+/* {{{ php_parse_date: Backwards compatibility function */
PHPAPI signed long php_parse_date(char *string, signed long *now)
{
timelib_time *parsed_time;
@@ -2538,8 +2538,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
timelib_time *now;
timelib_tzinfo *tzi = NULL;
timelib_error_container *err = NULL;
- int type = TIMELIB_ZONETYPE_ID, new_dst;
- char *new_abbr;
+ int type = TIMELIB_ZONETYPE_ID, new_dst = 0;
+ char *new_abbr = NULL;
timelib_sll new_offset;
if (dateobj->time) {
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index 725590136..536629a25 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -182,7 +182,7 @@ ZEND_END_MODULE_GLOBALS(date)
#define DATEG(v) (date_globals.v)
#endif
-/* Backwards compability wrapper */
+/* Backwards compatibility wrapper */
PHPAPI signed long php_parse_date(char *string, signed long *now);
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC);