fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7487] prepare for next php version


From: Sigurd Nes
Subject: [Fmsystem-commits] [7487] prepare for next php version
Date: Wed, 10 Aug 2011 15:53:05 +0000

Revision: 7487
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7487
Author:   sigurdne
Date:     2011-08-10 15:53:05 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
prepare for next php version

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.phpgw.inc.php
    trunk/phpgwapi/inc/functions.inc.php

Modified: trunk/phpgwapi/inc/class.phpgw.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.phpgw.inc.php      2011-08-10 15:51:10 UTC (rev 
7486)
+++ trunk/phpgwapi/inc/class.phpgw.inc.php      2011-08-10 15:53:05 UTC (rev 
7487)
@@ -393,8 +393,8 @@
                                // Trim whitespace so it doesn't trip us up
                                $value = trim($value);
                                
-                               // This won't be needed in PHP6 as GPC magic 
quotes are being removed
-                               if ( get_magic_quotes_gpc() )
+                               // This won't be needed in PHP 5.4 and later as 
GPC magic quotes are being removed
+                               if ( version_compare(PHP_VERSION, '5.3.7') <= 0 
&& get_magic_quotes_gpc() )
                                {
                                                $value = stripslashes($value);
                                }

Modified: trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- trunk/phpgwapi/inc/functions.inc.php        2011-08-10 15:51:10 UTC (rev 
7486)
+++ trunk/phpgwapi/inc/functions.inc.php        2011-08-10 15:53:05 UTC (rev 
7487)
@@ -305,7 +305,7 @@
                        case E_DEPRECATED:
                        case E_USER_DEPRECATED:
                                $log_args['severity'] = 'DP';
-                               $log->deprecated_($log_args);
+                               $log->deprecated($log_args);
                                echo '<p class="msg">' . lang('deprecated: %1 
in %2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
                                echo '<pre>' . phpgw_parse_backtrace($bt) . 
"</pre>\n";
                                break;
@@ -370,11 +370,11 @@
 
         /* Load main class */
        $GLOBALS['phpgw'] = createObject('phpgwapi.phpgw');
-
-       if(get_magic_quotes_runtime())
+       // get_magic_quotes_runtime() is deprecated in php 5.4.0
+       if( version_compare(PHP_VERSION, '5.3.7') <= 0 && 
get_magic_quotes_runtime())
        {
-               echo '<center><b>The magic_quotes_runtime has to set to Off in 
php.ini</b></center>';
-               exit;
+                       echo '<center><b>The magic_quotes_runtime has to set to 
Off in php.ini</b></center>';
+                       exit;
        }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]