Skip to content

Commit 3ba5660

Browse files
committed
fixup! Convert UNKNOWN default values to null in ext/date
1 parent 494b0d5 commit 3ba5660

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ext/date/php_date.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4525,8 +4525,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
45254525
zend_bool latitude_is_null = 1, longitude_is_null = 1, zenith_is_null = 1, gmt_offset_is_null = 1;
45264526
double h_rise, h_set, N;
45274527
timelib_sll rise, set, transit;
4528-
zend_long time, retformat;
4529-
zend_bool retformat_is_null;
4528+
zend_long time, retformat = SUNFUNCS_RET_STRING;
45304529
int rs;
45314530
timelib_time *t;
45324531
timelib_tzinfo *tzi;
@@ -4535,17 +4534,13 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
45354534
ZEND_PARSE_PARAMETERS_START(1, 6)
45364535
Z_PARAM_LONG(time)
45374536
Z_PARAM_OPTIONAL
4538-
Z_PARAM_LONG_OR_NULL(retformat, retformat_is_null)
4537+
Z_PARAM_LONG(retformat)
45394538
Z_PARAM_DOUBLE_OR_NULL(latitude, latitude_is_null)
45404539
Z_PARAM_DOUBLE_OR_NULL(longitude, longitude_is_null)
45414540
Z_PARAM_DOUBLE_OR_NULL(zenith, zenith_is_null)
45424541
Z_PARAM_DOUBLE_OR_NULL(gmt_offset, gmt_offset_is_null)
45434542
ZEND_PARSE_PARAMETERS_END();
45444543

4545-
if (retformat_is_null) {
4546-
retformat = SUNFUNCS_RET_STRING;
4547-
}
4548-
45494544
if (latitude_is_null) {
45504545
latitude = INI_FLT("date.default_latitude");
45514546
}

0 commit comments

Comments
 (0)