Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #11657
James Cole256262b2ba81
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.phpindex 003966c82a..373bc13db8 100644--- a/app/Repositories/Category/CategoryRepository.php+++ b/app/Repositories/Category/CategoryRepository.php@@ -60,6 +60,7 @@ class CategoryRepository implements CategoryRepositoryInterface, UserGroupInterfpublic function categoryStartsWith(string $query, int $limit): Collection{+ Log::debug(sprintf('Find a category that starts with "%s"', $query));$search = $this->user->categories();if ('' !== $query) {$search->whereLike('name', sprintf('%s%%', $query));diff --git a/app/Support/Search/QueryParser/QueryParser.php b/app/Support/Search/QueryParser/QueryParser.phpindex 32f389eb61..8209e3e003 100644--- a/app/Support/Search/QueryParser/QueryParser.php+++ b/app/Support/Search/QueryParser/QueryParser.php@@ -54,15 +54,17 @@ class QueryParser implements QueryParserInterface$prohibited = false;$chrArray = preg_split('//u', $this->query, -1, PREG_SPLIT_NO_EMPTY);$count = count($chrArray);+ $prevChar = null;while ($this->position < $count) {$char = $chrArray[$this->position];$nextChar = $chrArray[$this->position + 1] ?? '';- // Log::debug(sprintf('Char #%d: %s', $this->position, $char));+ $prevChar = $chrArray[$this->position - 1] ?? '';+ Log::debug(sprintf('Char #%d: %s', $this->position, $char));// If we're in a quoted string, we treat all characters except another quote as ordinary charactersif ($inQuotes) {- if ('\\' === $char && '"' === $nextChar) {- // Log::debug('BACKSLASH!');+ if ('\\' === $char && '"' === $nextChar && '\\' !== $prevChar) {+ Log::debug('Found a backslash and the next one is a double quote.');// escaped quote, pretend it's a normal char and continue two places (skipping the actual character).$tokenUnderConstruction .= '\\'.$nextChar;$this->position += 2;diff --git a/changelog.md b/changelog.mdindex 41088a301d..e50a1ac8d1 100644--- a/changelog.md+++ b/changelog.md@@ -31,6 +31,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).- [Issue 11601](https://github.com/firefly-iii/firefly-iii/issues/11601) (Only ungrouped piggy banks are listed when creating a transaction) reported by @jgmm81- [Issue 11620](https://github.com/firefly-iii/firefly-iii/issues/11620) (Add database indexes to improve reporting query performance) reported by @Zakmaf- [PR 11632](https://github.com/firefly-iii/firefly-iii/pull/11632) (fix v2 layout dashboard transactions load) reported by @mateuszkulapl+- #11657- #11660- Confirming your new email address would result in an error.