Skip to content

Commit 97ffd75

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents bc43e69 + b461c46 commit 97ffd75

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: ext/date/php_date.c

+5-5
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;
@@ -4555,7 +4555,7 @@ PHP_FUNCTION(date_default_timezone_get)
45554555

45564556
default_tz = get_timezone_info();
45574557
if (!default_tz) {
4558-
return;
4558+
RETURN_THROWS();
45594559
}
45604560
RETVAL_STRING(default_tz->name);
45614561
}
@@ -4614,7 +4614,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
46144614
/* Initialize time struct */
46154615
tzi = get_timezone_info();
46164616
if (!tzi) {
4617-
return;
4617+
RETURN_THROWS();
46184618
}
46194619
t = timelib_time_ctor();
46204620
t->tz_info = tzi;
@@ -4688,7 +4688,7 @@ PHP_FUNCTION(date_sun_info)
46884688
/* Initialize time struct */
46894689
tzi = get_timezone_info();
46904690
if (!tzi) {
4691-
return;
4691+
RETURN_THROWS();
46924692
}
46934693
t = timelib_time_ctor();
46944694
t->tz_info = tzi;

0 commit comments

Comments
 (0)