mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #1529 from styxit/master
Minor Sanitize::escape() update
This commit is contained in:
commit
0f2122e4f8
1 changed files with 1 additions and 1 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Reference in a new issue