Skip to content

Commit 1f49b1d

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

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

ext/enchant/enchant.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ PHP_FUNCTION(enchant_broker_free)
321321
enchant_broker *pbroker;
322322

323323
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) {
324-
RETURN_FALSE;
324+
return;
325325
}
326326
PHP_ENCHANT_GET_BROKER;
327327

@@ -339,7 +339,7 @@ PHP_FUNCTION(enchant_broker_get_error)
339339
char *msg;
340340

341341
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) {
342-
RETURN_FALSE;
342+
return;
343343
}
344344

345345
PHP_ENCHANT_GET_BROKER;
@@ -364,7 +364,7 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
364364
size_t value_len;
365365

366366
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls", &broker, &dict_type, &value, &value_len) == FAILURE) {
367-
RETURN_FALSE;
367+
return;
368368
}
369369

370370
if (!value_len) {
@@ -403,7 +403,7 @@ PHP_FUNCTION(enchant_broker_get_dict_path)
403403
char *value;
404404

405405
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &broker, &dict_type) == FAILURE) {
406-
RETURN_FALSE;
406+
return;
407407
}
408408

409409
PHP_ENCHANT_GET_BROKER;
@@ -458,7 +458,7 @@ PHP_FUNCTION(enchant_broker_list_dicts)
458458
enchant_broker *pbroker;
459459

460460
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) {
461-
RETURN_FALSE;
461+
return;
462462
}
463463

464464
PHP_ENCHANT_GET_BROKER;
@@ -481,7 +481,7 @@ PHP_FUNCTION(enchant_broker_request_dict)
481481
int pos;
482482

483483
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &broker, &tag, &taglen) == FAILURE) {
484-
RETURN_FALSE;
484+
return;
485485
}
486486

487487
PHP_ENCHANT_GET_BROKER;
@@ -529,7 +529,7 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
529529
int pos;
530530

531531
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rp", &broker, &pwl, &pwllen) == FAILURE) {
532-
RETURN_FALSE;
532+
return;
533533
}
534534

535535
if (php_check_open_basedir(pwl)) {
@@ -571,7 +571,7 @@ PHP_FUNCTION(enchant_broker_free_dict)
571571
enchant_dict *pdict;
572572

573573
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &dict) == FAILURE) {
574-
RETURN_FALSE;
574+
return;
575575
}
576576

577577
PHP_ENCHANT_GET_DICT;
@@ -591,7 +591,7 @@ PHP_FUNCTION(enchant_broker_dict_exists)
591591
enchant_broker * pbroker;
592592

593593
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &broker, &tag, &taglen) == FAILURE) {
594-
RETURN_FALSE;
594+
return;
595595
}
596596

597597
PHP_ENCHANT_GET_BROKER;
@@ -617,7 +617,7 @@ PHP_FUNCTION(enchant_broker_set_ordering)
617617
enchant_broker * pbroker;
618618

619619
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rss", &broker, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) {
620-
RETURN_FALSE;
620+
return;
621621
}
622622

623623
PHP_ENCHANT_GET_BROKER;
@@ -636,7 +636,7 @@ PHP_FUNCTION(enchant_broker_describe)
636636
enchant_broker * pbroker;
637637

638638
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) {
639-
RETURN_FALSE;
639+
return;
640640
}
641641

642642
PHP_ENCHANT_GET_BROKER;
@@ -656,7 +656,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
656656
enchant_dict *pdict;
657657

658658
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|z", &dict, &word, &wordlen, &sugg) == FAILURE) {
659-
RETURN_FALSE;
659+
return;
660660
}
661661

662662
if (sugg) {
@@ -704,7 +704,7 @@ PHP_FUNCTION(enchant_dict_check)
704704
enchant_dict *pdict;
705705

706706
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) {
707-
RETURN_FALSE;
707+
return;
708708
}
709709

710710
PHP_ENCHANT_GET_DICT;
@@ -726,7 +726,7 @@ PHP_FUNCTION(enchant_dict_suggest)
726726
size_t n_sugg_st;
727727

728728
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) {
729-
RETURN_FALSE;
729+
return;
730730
}
731731

732732
PHP_ENCHANT_GET_DICT;
@@ -756,7 +756,7 @@ PHP_FUNCTION(enchant_dict_add_to_personal)
756756
enchant_dict *pdict;
757757

758758
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) {
759-
RETURN_FALSE;
759+
return;
760760
}
761761

762762
PHP_ENCHANT_GET_DICT;
@@ -775,7 +775,7 @@ PHP_FUNCTION(enchant_dict_add_to_session)
775775
enchant_dict *pdict;
776776

777777
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) {
778-
RETURN_FALSE;
778+
return;
779779
}
780780

781781
PHP_ENCHANT_GET_DICT;
@@ -794,7 +794,7 @@ PHP_FUNCTION(enchant_dict_is_in_session)
794794
enchant_dict *pdict;
795795

796796
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &dict, &word, &wordlen) == FAILURE) {
797-
RETURN_FALSE;
797+
return;
798798
}
799799

800800
PHP_ENCHANT_GET_DICT;
@@ -817,7 +817,7 @@ PHP_FUNCTION(enchant_dict_store_replacement)
817817
enchant_dict *pdict;
818818

819819
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rss", &dict, &mis, &mislen, &cor, &corlen) == FAILURE) {
820-
RETURN_FALSE;
820+
return;
821821
}
822822

823823
PHP_ENCHANT_GET_DICT;
@@ -835,7 +835,7 @@ PHP_FUNCTION(enchant_dict_get_error)
835835
char *msg;
836836

837837
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &dict) == FAILURE) {
838-
RETURN_FALSE;
838+
return;
839839
}
840840

841841
PHP_ENCHANT_GET_DICT;
@@ -857,7 +857,7 @@ PHP_FUNCTION(enchant_dict_describe)
857857
enchant_dict *pdict;
858858

859859
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &dict) == FAILURE) {
860-
RETURN_FALSE;
860+
return;
861861
}
862862

863863
PHP_ENCHANT_GET_DICT;

0 commit comments

Comments
 (0)