From: Chad Horohoe Date: Wed, 2 Jul 2008 19:41:58 +0000 (+0000) Subject: Return true on success, not just false on failure. A bit of documentation as well :-) X-Git-Tag: 1.31.0-rc.0~46796 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7e627faec6bd2de38314de412618681750422337;p=lhc%2Fweb%2Fwiklou.git Return true on success, not just false on failure. A bit of documentation as well :-) --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 540a4d8d76..f1d8a7d820 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -463,6 +463,14 @@ class AutoLoader { ); + /** + * autoload - take a class name and attempt to load it + * + * @param string $className Name of class we're looking for. + * @return bool Returning false is important on failure as + * it allows Zend to try and look in other registered autoloaders + * as well. + */ static function autoload( $className ) { global $wgAutoloadClasses; @@ -484,7 +492,7 @@ class AutoLoader { if ( !$filename ) { # Give up wfProfileOut( __METHOD__ ); - return; + return false; } } @@ -495,6 +503,7 @@ class AutoLoader { } require( $filename ); wfProfileOut( __METHOD__ ); + return true; } static function loadAllExtensions() {