mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Fix missing account validation step.
This commit is contained in:
		| @@ -130,11 +130,13 @@ trait WithdrawalValidation | ||||
|     { | ||||
|         $accountId   = array_key_exists('id', $array) ? $array['id'] : null; | ||||
|         $accountName = array_key_exists('name', $array) ? $array['name'] : null; | ||||
|         $accountIban = array_key_exists('iban', $array) ? $array['iban'] : null; | ||||
|         $accountNumber =array_key_exists('number', $array) ? $array['number'] : null; | ||||
|  | ||||
|         Log::debug('Now in validateWithdrawalSource', $array); | ||||
|         // source can be any of the following types. | ||||
|         $validTypes = array_keys($this->combinations[$this->transactionType]); | ||||
|         if (null === $accountId && null === $accountName && false === $this->canCreateTypes($validTypes)) { | ||||
|         if (null === $accountId && null === $accountName && null === $accountNumber && null === $accountIban && false === $this->canCreateTypes($validTypes)) { | ||||
|             // if both values are NULL we return false, | ||||
|             // because the source of a withdrawal can't be created. | ||||
|             $this->sourceError = (string)trans('validation.withdrawal_source_need_data'); | ||||
|   | ||||
| @@ -90,7 +90,7 @@ trait TransactionValidation | ||||
|             Log::error(sprintf('Transactions array is not countable, because its a %s', gettype($transactions))); | ||||
|             return []; | ||||
|         } | ||||
|         Log::debug('Returning transactions.', $transactions); | ||||
|         //Log::debug('Returning transactions.', $transactions); | ||||
|  | ||||
|         return $transactions; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user