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

Merge branch 'PHP-8.4'

This commit is contained in:
David Carlier
2024-10-06 16:43:08 +01:00
2 changed files with 13 additions and 8 deletions

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