Skip to content

Commit 3648610

Browse files
committed
Merge branch 'PHP-8.1'
2 parents a7eda3d + 97ffd75 commit 3648610

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/date/php_date.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ PHP_FUNCTION(localtime)
13331333

13341334
tzi = get_timezone_info();
13351335
if (!tzi) {
1336-
return;
1336+
RETURN_THROWS();
13371337
}
13381338
ts = timelib_time_ctor();
13391339
ts->tz_info = tzi;
@@ -1387,7 +1387,7 @@ PHP_FUNCTION(getdate)
13871387

13881388
tzi = get_timezone_info();
13891389
if (!tzi) {
1390-
return;
1390+
RETURN_THROWS();
13911391
}
13921392
ts = timelib_time_ctor();
13931393
ts->tz_info = tzi;
@@ -4554,7 +4554,7 @@ PHP_FUNCTION(date_default_timezone_get)
45544554

45554555
default_tz = get_timezone_info();
45564556
if (!default_tz) {
4557-
return;
4557+
RETURN_THROWS();
45584558
}
45594559
RETVAL_STRING(default_tz->name);
45604560
}
@@ -4613,7 +4613,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, bool calc_s
46134613
/* Initialize time struct */
46144614
tzi = get_timezone_info();
46154615
if (!tzi) {
4616-
return;
4616+
RETURN_THROWS();
46174617
}
46184618
t = timelib_time_ctor();
46194619
t->tz_info = tzi;
@@ -4687,7 +4687,7 @@ PHP_FUNCTION(date_sun_info)
46874687
/* Initialize time struct */
46884688
tzi = get_timezone_info();
46894689
if (!tzi) {
4690-
return;
4690+
RETURN_THROWS();
46914691
}
46924692
t = timelib_time_ctor();
46934693
t->tz_info = tzi;

0 commit comments

Comments
 (0)