diff --git a/install/upgrade/classes/AddConfToFile.php b/install/upgrade/classes/AddConfToFile.php index f2525b4d0..d88678740 100644 --- a/install/upgrade/classes/AddConfToFile.php +++ b/install/upgrade/classes/AddConfToFile.php @@ -86,7 +86,7 @@ class AddConfToFile public function checkString($string) { - if (get_magic_quotes_gpc()) { + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $string = stripslashes($string); } if (!is_numeric($string)) { diff --git a/install/upgrade/php/latin1_database_to_utf8.php b/install/upgrade/php/latin1_database_to_utf8.php index a0fbcc7e5..4b7e6a8bc 100644 --- a/install/upgrade/php/latin1_database_to_utf8.php +++ b/install/upgrade/php/latin1_database_to_utf8.php @@ -25,7 +25,7 @@ */ if (!defined('_PS_MAGIC_QUOTES_GPC_')) { - define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc()); + define('_PS_MAGIC_QUOTES_GPC_', function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()); } if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_')) { define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));