Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix an issue where users were unable to create revenue / expense account combinations with the same name. #2987
James Cole534f4de5203b
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.phpindex 60492ad5f6..32880b31bc 100644--- a/app/Validation/FireflyValidator.php+++ b/app/Validation/FireflyValidator.php@@ -375,13 +375,14 @@ class FireflyValidator extends Validator*/public function validateUniqueAccountForUser($attribute, $value, $parameters): bool{+// because a user does not have to be logged in (tests and what-not).if (!auth()->check()) {return $this->validateAccountAnonymously();}- if (isset($this->data['what'])) {+ if (isset($this->data['objectType'])) {- return $this->validateByAccountTypeString($value, $parameters, $this->data['what']);+ return $this->validateByAccountTypeString($value, $parameters, $this->data['objectType']);}if (isset($this->data['type'])) {return $this->validateByAccountTypeString($value, $parameters, $this->data['type']);