From 88b29a4e590c46efa69f9609eb5ee8b280016320 Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Mon, 5 Nov 2012 14:45:57 -0800 Subject: [PATCH] Fixed errors: - Typo in variable name in JoinClassPathExpression; - Undefined class AST\ArithmeticPrimary (x2); - QueryException::invalidPathExpression() expects a PathExpression, not a string. --- lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php | 2 +- lib/Doctrine/ORM/Query/SqlWalker.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php index d6e6e2f59..a6bafea21 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php @@ -40,6 +40,6 @@ class JoinClassPathExpression extends Node public function dispatch($walker) { - return $sqlWalker->walkJoinPathExpression($this); + return $walker->walkJoinPathExpression($this); } } diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 26e31bdd7..fc3c313c6 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -1172,7 +1172,7 @@ class SqlWalker implements TreeWalker switch (true) { case ($expr instanceof AST\PathExpression): if ($expr->type !== AST\PathExpression::TYPE_STATE_FIELD) { - throw QueryException::invalidPathExpression($expr->type); + throw QueryException::invalidPathExpression($expr); } $fieldName = $expr->field; @@ -1213,7 +1213,6 @@ class SqlWalker implements TreeWalker case ($expr instanceof AST\SimpleArithmeticExpression): case ($expr instanceof AST\ArithmeticTerm): case ($expr instanceof AST\ArithmeticFactor): - case ($expr instanceof AST\ArithmeticPrimary): case ($expr instanceof AST\Literal): case ($expr instanceof AST\NullIfExpression): case ($expr instanceof AST\CoalesceExpression): @@ -1513,7 +1512,6 @@ class SqlWalker implements TreeWalker case ($expr instanceof AST\SimpleArithmeticExpression): case ($expr instanceof AST\ArithmeticTerm): case ($expr instanceof AST\ArithmeticFactor): - case ($expr instanceof AST\ArithmeticPrimary): case ($expr instanceof AST\Literal): case ($expr instanceof AST\NullIfExpression): case ($expr instanceof AST\CoalesceExpression):