Merge pull request #1529 from styxit/master

Minor Sanitize::escape() update
This commit is contained in:
Christian Winther 2013-08-15 03:28:08 -07:00
commit 0f2122e4f8

View file

@ -67,10 +67,10 @@ class Sanitize {
* @return string SQL safe string
*/
public static function escape($string, $connection = 'default') {
$db = ConnectionManager::getDataSource($connection);
if (is_numeric($string) || $string === null || is_bool($string)) {
return $string;
}
$db = ConnectionManager::getDataSource($connection);
$string = $db->value($string, 'string');
$start = 1;
if ($string{0} === 'N') {