From 92bd0ac1a042dd837d2321cb5d7f62e00945903f Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 17 Sep 2009 21:52:40 +0000 Subject: [PATCH] Only set "unserialize_callback_func" if we use it, otherwise it can throw warning saying that __autoload() is not defined --- includes/AutoLoader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 6b06a80b99..7b7303d17a 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -2,8 +2,6 @@ /* This defines autoloading handler for whole MediaWiki framework */ -ini_set('unserialize_callback_func', '__autoload' ); - # Locations of core classes # Extension classes are specified with $wgAutoloadClasses # This array is a global instead of a static member of AutoLoader to work around a bug in APC @@ -687,4 +685,6 @@ if ( function_exists( 'spl_autoload_register' ) ) { function __autoload( $class ) { AutoLoader::autoload( $class ); } + + ini_set( 'unserialize_callback_func', '__autoload' ); } -- 2.20.1