File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 6
6
. Fixed GH-16240: jdtounix overflow on argument value. (David Carlier)
7
7
. Fixed GH-16241: easter_days/easter_date overflow on year argument.
8
8
(David Carlier)
9
+ . Fixed GH-16263: jddayofweek overflow. (cmb)
9
10
10
11
- CLI:
11
12
. Fixed bug GH-16137: duplicate http headers when set several times by
Original file line number Diff line number Diff line change 33
33
int DayOfWeek (
34
34
zend_long sdn )
35
35
{
36
- int dow ;
37
-
38
- dow = (sdn + 1 ) % 7 ;
39
- if (dow >= 0 ) {
40
- return (dow );
41
- } else {
42
- return (dow + 7 );
43
- }
36
+ return (int )(sdn % 7 + 8 ) % 7 ;
44
37
}
45
38
46
39
const char * const DayNameShort [7 ] =
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-16258 (jddayofweek overflow on argument)
3
+ --EXTENSIONS--
4
+ calendar
5
+ --FILE--
6
+ <?php
7
+ jddayofweek (PHP_INT_MAX , 1 );
8
+ jddayofweek (PHP_INT_MIN , 1 );
9
+ echo "DONE " ;
10
+ ?>
11
+ --EXPECT--
12
+ DONE
You can’t perform that action at this time.
0 commit comments