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:
2
NEWS
2
NEWS
@@ -11,6 +11,8 @@ PHP NEWS
|
||||
. Fixed bug GH-18076 (Since PHP 8, the date_sun_info() function returns
|
||||
inaccurate sunrise and sunset times, but other calculated times are
|
||||
correct) (JiriJozif).
|
||||
. Fixed bug GH-18481 (date_sunrise with unexpected nan value for the offset).
|
||||
(nielsdos/David Carlier)
|
||||
|
||||
- Intl:
|
||||
. Fix various reference issues. (nielsdos)
|
||||
|
||||
@@ -5573,7 +5573,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, bool calc_s
|
||||
if (N > 24 || N < 0) {
|
||||
N -= floor(N / 24) * 24;
|
||||
}
|
||||
if (N > 24 || N < 0) {
|
||||
if (!(N <= 24 && N >= 0)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
21
ext/date/tests/gh18481.phpt
Normal file
21
ext/date/tests/gh18481.phpt
Normal file
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
GH-18481 (date_sunrise with utcOffset as INF)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
foreach ([-NAN, NAN, INF, -INF] as $offset) {
|
||||
var_dump(date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, $offset));
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Function date_sunrise() is deprecated in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Deprecated: Function date_sunrise() is deprecated in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Deprecated: Function date_sunrise() is deprecated in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Deprecated: Function date_sunrise() is deprecated in %s on line %d
|
||||
bool(false)
|
||||
Reference in New Issue
Block a user