diff options
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 8b1e84f91e..08f0a4f3b2 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1757,6 +1757,10 @@ PHP_FUNCTION(gmstrftime) Return current UNIX timestamp */ PHP_FUNCTION(time) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_LONG((zend_long)time(NULL)); } /* }}} */ @@ -4835,6 +4839,9 @@ PHP_FUNCTION(date_default_timezone_set) PHP_FUNCTION(date_default_timezone_get) { timelib_tzinfo *default_tz; + if (zend_parse_parameters_none() == FAILURE) { + return; + } default_tz = get_timezone_info(); RETVAL_STRING(default_tz->name); |