Partial revert of r85236: __autoload() is needed for HipHop interpreted mode support.
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 4 Apr 2011 01:12:22 +0000 (01:12 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 4 Apr 2011 01:12:22 +0000 (01:12 +0000)
includes/AutoLoader.php

index 1ce8c49..a4c7ae5 100644 (file)
@@ -837,4 +837,12 @@ class AutoLoader {
        }
 }
 
-spl_autoload_register( array( 'AutoLoader', 'autoload' ) );
+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' );
+}