Permalink
Browse files

Fix failing tests with SQLServer.

  • Loading branch information...
1 parent f22c80e commit d69c3f3db661c12e5d0aa6867bd89dee2ef8940e @markstory markstory committed Jan 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Cake/Utility/Sanitize.php
@@ -69,7 +69,10 @@ public static function escape($string, $connection = 'default') {
if (is_numeric($string) || $string === null || is_bool($string)) {
return $string;
}
- $string = substr($db->value($string), 1);
+ $string = $db->value($string, 'string');
+ if ($string[0] === 'N') {
+ $string = substr($string, 2);
+ }
$string = substr($string, 0, -1);
return $string;
}

0 comments on commit d69c3f3

Please sign in to comment.