1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2' into PHP-8.3

This commit is contained in:
David Carlier
2024-10-06 16:42:38 +01:00
3 changed files with 14 additions and 8 deletions

1
NEWS
View File

@@ -6,6 +6,7 @@ PHP NEWS
. Fixed GH-16240: jdtounix overflow on argument value. (David Carlier)
. Fixed GH-16241: easter_days/easter_date overflow on year argument.
(David Carlier)
. Fixed GH-16263: jddayofweek overflow. (cmb)
- CLI:
. Fixed bug GH-16137: duplicate http headers when set several times by

View File

@@ -33,14 +33,7 @@
int DayOfWeek(
zend_long sdn)
{
int dow;
dow = (sdn + 1) % 7;
if (dow >= 0) {
return (dow);
} else {
return (dow + 7);
}
return (int)(sdn % 7 + 8) % 7;
}
const char * const DayNameShort[7] =

View File

@@ -0,0 +1,12 @@
--TEST--
GH-16258 (jddayofweek overflow on argument)
--EXTENSIONS--
calendar
--FILE--
<?php
jddayofweek(PHP_INT_MAX, 1);
jddayofweek(PHP_INT_MIN, 1);
echo "DONE";
?>
--EXPECT--
DONE