update getm_magic_quotes function checks
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user