/**
* Get the selected contribution status.
*
- * @return string
+ * @return string|null
*
* @throws \API_Exception
*/
- protected function getPreviousContributionStatus(): string {
+ protected function getPreviousContributionStatus(): ?string {
+ if (!$this->getContributionID()) {
+ return NULL;
+ }
if (!$this->previousContributionStatus) {
$this->previousContributionStatus = Contribution::get(FALSE)
->addWhere('id', '=', $this->getContributionID())
*
* @param string $thousandSeparator
*
- * @throws \CRM_Core_Exception
- * @throws \CiviCRM_API3_Exception
- * @throws \Civi\Payment\Exception\PaymentProcessorException
* @dataProvider getThousandSeparators
*/
public function testSubmit(string $thousandSeparator): void {