mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 10:51:12 -06:00
A longer search string will no longer partly match on account name!
This commit is contained in:
parent
e5514bc61a
commit
29e02ce31f
@ -75,10 +75,11 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
|
||||
$searchLength = strlen($search);
|
||||
|
||||
// if the string to search for is longer than the account name,
|
||||
// shorten the search string.
|
||||
// it will never be in the account name.
|
||||
if ($searchLength > $nameLength) {
|
||||
$search = substr($search, ($nameLength * -1));
|
||||
$searchLength = strlen($search);
|
||||
Log::debug(sprintf('RuleTrigger FromAccountEnds for journal #%d: "%s" does not end with "%s", return false.', $journal->id, $name, $search));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user