diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2000-06-14 16:35:48 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2000-06-14 16:35:48 +0000 |
| commit | 0b5ca3f7d5ede410e6b392c42b0e7e5da4cfb4de (patch) | |
| tree | d453724b09dd76aff8898207118bad1b5dc8e02d /ext | |
| parent | 79f857b323cb1d80d44ee32078d6dc8b1cd02949 (diff) | |
| download | php-git-0b5ca3f7d5ede410e6b392c42b0e7e5da4cfb4de.tar.gz | |
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)
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/datetime.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |
