summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2000-06-14 16:35:48 +0000
committerRasmus Lerdorf <rasmus@php.net>2000-06-14 16:35:48 +0000
commit0b5ca3f7d5ede410e6b392c42b0e7e5da4cfb4de (patch)
treed453724b09dd76aff8898207118bad1b5dc8e02d /ext
parent79f857b323cb1d80d44ee32078d6dc8b1cd02949 (diff)
downloadphp-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.c3
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);