summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--ext/standard/datetime.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index dc1a18a634..a9c3197f2b 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ PHP 4 NEWS
(Moriyoshi)
- Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2).
(Elf, Ilia)
+- Fixed leap year checking with idate(). (Christian Schneider, Derick)
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
03 Jun 2004, Version 4.3.7
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 59461aa421..4de3d5f95f 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -64,7 +64,7 @@ static int phpday_tab[2][12] = {
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
-#define isleap(year) (((year % 4) == 0 && (year % 100) != 0) || (year % 400)==0)
+#define isleap(year) ((((year) % 4) == 0 && ((year) % 100) != 0) || ((year) % 400)==0)
#define YEAR_BASE 1900
/* {{{ proto int time(void)