From 0d480e0fa608245bc7041c93ad99e4f1cb2db13f Mon Sep 17 00:00:00 2001 From: Peter Haight Date: Sat, 6 Sep 2014 13:14:09 -0700 Subject: [PATCH] mysql_escape_string is deprecated in PHP 5.5 This gets rid of a deprecation warning which is erroring some tests. --- CRM/Core/I18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 2328e89a40..7d0bcd2082 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -225,7 +225,7 @@ class CRM_Core_I18n { // in such cases we return early, only doing SQL/JS escaping if (isset($params['skip']) and $params['skip']) { if (isset($escape) and ($escape == 'sql')) { - $text = mysql_escape_string($text); + $text = mysql_real_escape_string($text); } if (isset($escape) and ($escape == 'js')) { $text = addcslashes($text, "'"); @@ -322,7 +322,7 @@ class CRM_Core_I18n { // escape SQL if we were asked for it if (isset($escape) and ($escape == 'sql')) { - $text = mysql_escape_string($text); + $text = mysql_real_escape_string($text); } // escape for JavaScript (if requested) -- 2.25.1