Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 2, 2024
1 parent 782f7d6 commit 0637851
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QueryReflection/QueryReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,17 @@ private function resolveQueryStringExpr(Expr $queryExpr, Scope $scope, bool $res
$leftString = $this->resolveQueryStringExpr($left, $scope);
$rightString = $this->resolveQueryStringExpr($right, $scope);

if (null === $leftString || null === $rightString) {
return null;
}

// queries with a dynamic FROM are not resolvable
if (QueryReflection::getRuntimeConfiguration()->isDebugEnabled()) {
if (str_ends_with(rtrim($leftString), 'FROM') && is_numeric(trim($rightString, '"\''))) {
throw new UnresolvableQueryDynamicFromException('Seems the query is too dynamic to be resolved by query simulation');
}
}

if (null === $leftString || null === $rightString) {
return null;
}

return $leftString . $rightString;
}

Expand Down

0 comments on commit 0637851

Please sign in to comment.