Skip to content
Snippets Groups Projects
Commit e63ba580 authored by Peter Rotich's avatar Peter Rotich
Browse files

ORM cast object to string

db_real_escape expects a string
parent ef9b743c
Branches
Tags
No related merge requests found
......@@ -3109,12 +3109,11 @@ class MySqlPreparedExecutor {
case is_int($p):
case is_float($p):
return $p;
case $p instanceof DateTime:
$p = $p->format('Y-m-d H:i:s');
default:
return db_real_escape($p, true);
}
return db_real_escape((string) $p, true);
}
}, $this->sql);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment