From: Alexandre Emsenhuber Date: Thu, 17 Sep 2009 21:52:40 +0000 (+0000) Subject: Only set "unserialize_callback_func" if we use it, otherwise it can throw warning... X-Git-Tag: 1.31.0-rc.0~39659 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=92bd0ac1a042dd837d2321cb5d7f62e00945903f;p=lhc%2Fweb%2Fwiklou.git Only set "unserialize_callback_func" if we use it, otherwise it can throw warning saying that __autoload() is not defined --- 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' ); }