mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
A longer search string will no longer partly match on account name!
This commit is contained in:
@@ -75,10 +75,11 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
|
|||||||
$searchLength = strlen($search);
|
$searchLength = strlen($search);
|
||||||
|
|
||||||
// if the string to search for is longer than the account name,
|
// 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) {
|
if ($searchLength > $nameLength) {
|
||||||
$search = substr($search, ($nameLength * -1));
|
Log::debug(sprintf('RuleTrigger FromAccountEnds for journal #%d: "%s" does not end with "%s", return false.', $journal->id, $name, $search));
|
||||||
$searchLength = strlen($search);
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user