get_magic_quotes_* functions deprecated in PHP 5.3.x. Check for
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 3 Mar 2008 14:03:22 +0000 (14:03 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 3 Mar 2008 14:03:22 +0000 (14:03 +0000)
existance and ignore deprecation warnings.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12987 7612ce4b-ef26-0410-bec9-ea0150e637f0

include/init.php
src/configtest.php

index d12b71d83dcaef6c42858ab46af8b79a5e63b73c..05d9cbae0e8e4ac7e05b841a6974a48e69be808a 100644 (file)
@@ -203,7 +203,7 @@ ini_set('magic_quotes_runtime','0');
 
 /* if running with magic_quotes_gpc then strip the slashes
    from POST and GET global arrays */
-if (get_magic_quotes_gpc()) {
+if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) {
     sqstripslashes($_GET);
     sqstripslashes($_POST);
 }
index 967ac11a05969ecd322c338da7370e744d5ebca7..a89020bffc91798f3e759f76761d918fb8a9ae0a 100644 (file)
@@ -303,7 +303,8 @@ if (function_exists('mb_internal_encoding') &&
 /**
  * Do not use SquirrelMail with magic_quotes_* on.
  */
-if ( get_magic_quotes_runtime() || get_magic_quotes_gpc() ||
+if ( (function_exists('get_magic_quotes_runtime') &&  @get_magic_quotes_runtime()) ||
+     (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) ||
     ( (bool) ini_get('magic_quotes_sybase') && ini_get('magic_quotes_sybase') != 'off' )
     ) {
     $magic_quotes_warning='You have enabled any one of <tt>magic_quotes_runtime</tt>, '