Throw a DatabaseException when an object is specified as a query parameter.

develop
Sven Slootweg 11 years ago
parent 58cfffd3d8
commit a90ffa590d

@ -118,6 +118,10 @@ class CachedPDO extends PDO
public function GuessType($value)
{
if(is_object($value))
{
throw new DatabaseException("Query parameters must be numeric, boolean, null, a string value, or something that can be auto-cast to a string. You provided an object.");
}
if(is_int($value))
{
return PDO::PARAM_INT;

Loading…
Cancel
Save