From 96f822725552942d4486b7ab93485ab08edb9527 Mon Sep 17 00:00:00 2001 From: phpnut Date: Thu, 1 Feb 2007 03:38:27 +0000 Subject: [PATCH] Adding fix for #1822 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4378 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_mssql.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/cake/libs/model/datasources/dbo/dbo_mssql.php index 906cea4c4..2bd491795 100644 --- a/cake/libs/model/datasources/dbo/dbo_mssql.php +++ b/cake/libs/model/datasources/dbo/dbo_mssql.php @@ -266,7 +266,11 @@ class DboMssql extends DboSource { $data = $this->boolean((bool)$data); break; default: - $data = stripslashes(r("'", "''", $data)); + if (get_magic_quotes_gpc()) { + $data = stripslashes(r("'", "''", $data)); + } else { + $data = r("'", "''", $data); + } break; } return "'" . $data . "'";