mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3' into PHP-8.4
This commit is contained in:
1
NEWS
1
NEWS
@@ -13,6 +13,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
|
||||
|
||||
@@ -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] =
|
||||
|
||||
12
ext/calendar/tests/gh16258.phpt
Normal file
12
ext/calendar/tests/gh16258.phpt
Normal 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
|
||||
Reference in New Issue
Block a user