summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-09-12 11:25:21 +0800
committerXinchen Hui <laruence@gmail.com>2017-09-12 11:25:21 +0800
commitff6f41c94e38cb418a4466a236b0afabe222552f (patch)
treef03703f25f4d4dd6f042dd8a06ef018005f7d5fc /ext/date/php_date.c
parent0d890025ec338b767afd8433d3d852d7a4bba1d8 (diff)
downloadphp-git-ff6f41c94e38cb418a4466a236b0afabe222552f.tar.gz
Narrow typeinfos down for zend_parse_paramenters_none
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c7
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);