From 81e9b02ff51bfe86a8da159c7ad3c0f16977e0c8 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 3 Apr 2011 09:44:50 +0000 Subject: [PATCH] * Drop 5.1 compat code * Fix one more PHP version requirement --- includes/AutoLoader.php | 10 +--------- includes/GlobalFunctions.php | 2 +- includes/Hooks.php | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 7e4ecf17db..2d690dfe45 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -835,12 +835,4 @@ class AutoLoader { } } -if ( function_exists( 'spl_autoload_register' ) ) { - spl_autoload_register( array( 'AutoLoader', 'autoload' ) ); -} else { - function __autoload( $class ) { - AutoLoader::autoload( $class ); - } - - ini_set( 'unserialize_callback_func', '__autoload' ); -} +spl_autoload_register( array( 'AutoLoader', 'autoload' ) ); diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 9cdce49b82..9dbbe54ed3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -16,7 +16,7 @@ require_once dirname( __FILE__ ) . '/normal/UtfNormalUtil.php'; /** * Compatibility functions * - * We support PHP 5.1.x and up. + * We support PHP 5.2.3 and up. * Re-implementations of newer functions or functions in non-standard * PHP extensions may be included here. */ diff --git a/includes/Hooks.php b/includes/Hooks.php index 87c677dce9..3f05268430 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -203,8 +203,6 @@ class Hooks { } elseif ( isset( $object ) ) { $func = get_class( $object ) . '::' . $method; $callback = array( $object, $method ); - } elseif ( false !== ( $pos = strpos( $func, '::' ) ) ) { - $callback = array( substr( $func, 0, $pos ), substr( $func, $pos + 2 ) ); } else { $callback = $func; } -- 2.20.1