Permalink
Browse files

ORM cast object to string

db_real_escape expects a string
  • Loading branch information...
protich committed Oct 24, 2016
1 parent ef9b743 commit e63ba580b34fd9cc934f9c09bfc4cab4ecfbc994
Showing with 2 additions and 3 deletions.
  1. +2 −3 include/class.orm.php
View
@@ -3109,12 +3109,11 @@ function($m) use ($self) {
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 comments on commit e63ba58

Please sign in to comment.