[CORE][DB] Fix error in regex that prevented selecting collumns that are named the same way a column is

This commit is contained in:
Hugo Sales 2021-11-01 21:04:49 +00:00
parent 839fa070c7
commit 1960f6944f
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class DB
*/
public static function dql(string $query, array $params = [], array $options = [])
{
$query = preg_replace(F\map(self::$table_map, fn ($_, $s) => "/\\b{$s}\\b/"), self::$table_map, $query);
$query = preg_replace(F\map(self::$table_map, fn ($_, $s) => "/(?<!\\.)\\b{$s}\\b/"), self::$table_map, $query);
$q = new Query(self::$em);
$q->setDQL($query);