mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for #2881, Sanitize::escape() problem with trim()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5418 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7e499f1f14
commit
a1019dfad3
1 changed files with 2 additions and 1 deletions
|
@ -72,7 +72,8 @@ class Sanitize{
|
|||
*/
|
||||
function escape($string, $connection = 'default') {
|
||||
$db = ConnectionManager::getDataSource($connection);
|
||||
$value = trim($db->value($string), '\'');
|
||||
$value = substr($db->value($string), 1);
|
||||
$value = substr($value, 0, -1);
|
||||
return $value;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue