From: Eileen McNaughton Date: Mon, 12 Sep 2022 23:54:26 +0000 (+1200) Subject: Improve contribution import error handling X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad7979f42df6624fcf42c17636f06828947e33e3;p=civicrm-core.git Improve contribution import error handling --- diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 11f59ffb5a..48169889fa 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1778,7 +1778,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { } /** - * @param $outcome + * @param int|null|string $outcome * * @return string */ diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index 46940b7343..39abb75766 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -486,11 +486,11 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser { /** * Get the status to record. * - * @param int|null $code + * @param int|null|string $code * * @return string */ - protected function getStatus(?int $code): string { + protected function getStatus($code): string { $errorMapping = [ self::SOFT_CREDIT_ERROR => 'soft_credit_error', self::PLEDGE_PAYMENT_ERROR => 'pledge_payment_error',