Skip to content

Commit f50c460

Browse files
committed
Don't explicitly set return value on ZPP failure in ext/calendar
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return value is useless, and also slightly confusing.
1 parent 7602169 commit f50c460

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ext/calendar/calendar.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ PHP_FUNCTION(cal_info)
295295

296296

297297
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &cal) == FAILURE) {
298-
RETURN_FALSE;
298+
return;
299299
}
300300

301301
if (cal == -1) {
@@ -331,7 +331,7 @@ PHP_FUNCTION(cal_days_in_month)
331331
zend_long sdn_start, sdn_next;
332332

333333
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &cal, &month, &year) == FAILURE) {
334-
RETURN_FALSE;
334+
return;
335335
}
336336

337337
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -377,7 +377,7 @@ PHP_FUNCTION(cal_to_jd)
377377
zend_long cal, month, day, year;
378378

379379
if (zend_parse_parameters(ZEND_NUM_ARGS(), "llll", &cal, &month, &day, &year) != SUCCESS) {
380-
RETURN_FALSE;
380+
return;
381381
}
382382

383383
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -398,7 +398,7 @@ PHP_FUNCTION(cal_from_jd)
398398
const struct cal_entry_t *calendar;
399399

400400
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &jd, &cal) == FAILURE) {
401-
RETURN_FALSE;
401+
return;
402402
}
403403

404404
if (cal < 0 || cal >= CAL_NUM_CALS) {
@@ -449,7 +449,7 @@ PHP_FUNCTION(jdtogregorian)
449449
int year, month, day;
450450

451451
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
452-
RETURN_FALSE;
452+
return;
453453
}
454454

455455
SdnToGregorian(julday, &year, &month, &day);
@@ -465,7 +465,7 @@ PHP_FUNCTION(gregoriantojd)
465465
zend_long year, month, day;
466466

467467
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) == FAILURE) {
468-
RETURN_FALSE;
468+
return;
469469
}
470470

471471
RETURN_LONG(GregorianToSdn(year, month, day));
@@ -480,7 +480,7 @@ PHP_FUNCTION(jdtojulian)
480480
int year, month, day;
481481

482482
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
483-
RETURN_FALSE;
483+
return;
484484
}
485485

486486
SdnToJulian(julday, &year, &month, &day);
@@ -496,7 +496,7 @@ PHP_FUNCTION(juliantojd)
496496
zend_long year, month, day;
497497

498498
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) == FAILURE) {
499-
RETURN_FALSE;
499+
return;
500500
}
501501

502502
RETURN_LONG(JulianToSdn(year, month, day));
@@ -609,7 +609,7 @@ PHP_FUNCTION(jdtojewish)
609609
char *dayp, *yearp;
610610

611611
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|bl", &julday, &heb, &fl) == FAILURE) {
612-
RETURN_FALSE;
612+
return;
613613
}
614614

615615
SdnToJewish(julday, &year, &month, &day);
@@ -640,7 +640,7 @@ PHP_FUNCTION(jewishtojd)
640640
zend_long year, month, day;
641641

642642
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) == FAILURE) {
643-
RETURN_FALSE;
643+
return;
644644
}
645645

646646
RETURN_LONG(JewishToSdn(year, month, day));
@@ -655,7 +655,7 @@ PHP_FUNCTION(jdtofrench)
655655
int year, month, day;
656656

657657
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &julday) == FAILURE) {
658-
RETURN_FALSE;
658+
return;
659659
}
660660

661661
SdnToFrench(julday, &year, &month, &day);
@@ -671,7 +671,7 @@ PHP_FUNCTION(frenchtojd)
671671
zend_long year, month, day;
672672

673673
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &month, &day, &year) == FAILURE) {
674-
RETURN_FALSE;
674+
return;
675675
}
676676

677677
RETURN_LONG(FrenchToSdn(year, month, day));
@@ -687,7 +687,7 @@ PHP_FUNCTION(jddayofweek)
687687
const char *daynamel, *daynames;
688688

689689
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &julday, &mode) == FAILURE) {
690-
RETURN_FALSE;
690+
return;
691691
}
692692

693693
day = DayOfWeek(julday);
@@ -718,7 +718,7 @@ PHP_FUNCTION(jdmonthname)
718718
int month, day, year;
719719

720720
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &julday, &mode) == FAILURE) {
721-
RETURN_FALSE;
721+
return;
722722
}
723723

724724
switch (mode) {

0 commit comments

Comments
 (0)