Skip to content

Commit

Permalink
Account for the entire string
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-rainville committed Jul 25, 2024
1 parent 732d8f9 commit 30ced2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ORM/Queries/SQLConditionalExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public function addFrom($from)
$this->from = array_merge($this->from, $from);
} elseif (!empty($from)) {
// $this->from[str_replace(['"','`'], '', $from)] = $from;
if (preg_match('/"?([a-zA-Z0-9_]+)"?/', $from)) {
$from = trim($from);
if (preg_match('/^"?([a-zA-Z0-9_]+)"?$/', $from)) {
$this->from[str_replace(['"','`'], '', $from)] = $from;
} else {
$this->from[] = $from;
Expand Down

0 comments on commit 30ced2a

Please sign in to comment.