summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 18c0f32b57..c9c5d26da8 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1063,6 +1063,10 @@ PHP_FUNCTION(strtotime)
RETURN_FALSE;
}
+ if (!time_len) {
+ RETURN_FALSE;
+ }
+
t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB);
error1 = error->error_count;
timelib_error_container_dtor(error);
@@ -1078,7 +1082,7 @@ PHP_FUNCTION(strtotime)
timelib_tzinfo_dtor(t->tz_info);
}
- timelib_time_dtor(now);
+ timelib_time_dtor(now);
timelib_time_dtor(t);
if (error1 || error2) {