Only set "unserialize_callback_func" if we use it, otherwise it can throw warning...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 17 Sep 2009 21:52:40 +0000 (21:52 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 17 Sep 2009 21:52:40 +0000 (21:52 +0000)
includes/AutoLoader.php

index 6b06a80..7b7303d 100644 (file)
@@ -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' );
 }