]> granicus.if.org Git - php/commitdiff
Require the year arg to checkdate to be an integer - fix for bug #5034
authorRasmus Lerdorf <rasmus@php.net>
Wed, 14 Jun 2000 16:35:48 +0000 (16:35 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Wed, 14 Jun 2000 16:35:48 +0000 (16:35 +0000)
@Require the year arg to checkdate to be an integer (Rasmus)

ext/standard/datetime.c

index 6c88b42566179b9a248e5633ba8232f315b9b632..b856480c0d0e0f132dedc7d6f52910723afd0c63 100644 (file)
@@ -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);