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

Merge pull request #218 from greezybacon/issue/orm-bool-param


orm: Fix handling of bool and float params

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 67e7ff87 cea9f28a
No related branches found
No related tags found
No related merge requests found
......@@ -872,8 +872,10 @@ class MysqlExecutor {
$types = '';
$ps = array();
foreach ($params as &$p) {
if (is_int($p))
if (is_int($p) || is_bool($p))
$types .= 'i';
elseif (is_float($p))
$types .= 'd';
elseif (is_string($p))
$types .= 's';
// TODO: Emit error if param is null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment