From 26a2ec2e6339a18b5564585528778f7be784e207 Mon Sep 17 00:00:00 2001 From: beberlei Date: Sat, 21 Nov 2009 13:18:45 +0000 Subject: [PATCH] DDC-127 - Special Case with invalid input parameter in DQL leads to php notice instead of an exception. --- lib/Doctrine/ORM/Query/AST/InputParameter.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Query/AST/InputParameter.php b/lib/Doctrine/ORM/Query/AST/InputParameter.php index abc958796..54d70f93c 100644 --- a/lib/Doctrine/ORM/Query/AST/InputParameter.php +++ b/lib/Doctrine/ORM/Query/AST/InputParameter.php @@ -37,10 +37,16 @@ class InputParameter extends Node public $isNamed; public $name; + /** + * @param string $value + */ public function __construct($value) { if (strlen($value) == 1) { - throw new \InvalidArgumentException("Invalid parameter format."); + throw new \InvalidArgumentException( + "Invalid parameter format, '".$value."' given, ". + "but : or ? expected." + ); } $param = substr($value, 1);