Skip to content

Commit 885083f

Browse files
authored
return parent instead of Exception
1 parent e586c24 commit 885083f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Gedmo/Translatable/Query/TreeWalker/TranslationWalker.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ public function __construct($query, $parserResult, array $queryComponents)
104104
*/
105105
public function getExecutor($AST)
106106
{
107+
// If it's not a Select, the TreeWalker ought to skip it, and just return the parent.
108+
// @see https://github.com/Atlantic18/DoctrineExtensions/issues/2013
107109
if (!$AST instanceof SelectStatement) {
108-
throw new \Gedmo\Exception\UnexpectedValueException('Translation walker should be used only on select statement');
110+
return parent::getExecutor($AST);
109111
}
110112
$this->prepareTranslatedComponents();
111113

0 commit comments

Comments
 (0)