mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.4'
This commit is contained in:
commit
a7edde7c40
2 changed files with 13 additions and 8 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue