1
0
mirror of synced 2025-01-18 22:41:43 +03:00

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

This commit is contained in:
beberlei 2009-11-21 13:18:45 +00:00
parent f9ab947372
commit 26a2ec2e63

View File

@ -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 :<name> or ?<num> expected."
);
}
$param = substr($value, 1);