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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index c2ef177894..e780b2ee6b 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -4270,6 +4270,10 @@ static zend_string *date_interval_format(char *format, size_t format_len, timeli
smart_str_0(&string);
+ if (string.s == NULL) {
+ return ZSTR_EMPTY_ALLOC();
+ }
+
return string.s;
}
/* }}} */