From: Rasmus Lerdorf Date: Wed, 14 Jun 2000 16:35:48 +0000 (+0000) Subject: Require the year arg to checkdate to be an integer - fix for bug #5034 X-Git-Tag: php-4.0.1RC~192 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b5ca3f7d5ede410e6b392c42b0e7e5da4cfb4de;p=php Require the year arg to checkdate to be an integer - fix for bug #5034 @Require the year arg to checkdate to be an integer (Rasmus) --- diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 6c88b42566..b856480c0d 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -601,6 +601,9 @@ PHP_FUNCTION(checkdate) zend_get_parameters_ex(3, &month, &day, &year) == FAILURE) { WRONG_PARAM_COUNT; } + if((*year)->type != IS_LONG) { + RETURN_FALSE; + } convert_to_long_ex(day); convert_to_long_ex(month); convert_to_long_ex(year);