Commit 26a2ec2e authored by beberlei's avatar beberlei

DDC-127 - Special Case with invalid input parameter in DQL leads to php notice...

DDC-127 - Special Case with invalid input parameter in DQL leads to php notice instead of an exception.
parent f9ab9473
...@@ -37,10 +37,16 @@ class InputParameter extends Node ...@@ -37,10 +37,16 @@ class InputParameter extends Node
public $isNamed; public $isNamed;
public $name; public $name;
/**
* @param string $value
*/
public function __construct($value) public function __construct($value)
{ {
if (strlen($value) == 1) { if (strlen($value) == 1) {
throw new \InvalidArgumentException("Invalid parameter format."); throw new \InvalidArgumentException(
"Invalid parameter format, '".$value."' given, ".
"but :<name> or ?<num> expected."
);
} }
$param = substr($value, 1); $param = substr($value, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment