Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 30, 2023
1 parent 623dffa commit 515eb12
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 @@ -361,17 +361,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 515eb12

Please sign in to comment.