Return true on success, not just false on failure. A bit of documentation as well :-)
This commit is contained in:
parent
196060cf96
commit
7e627faec6
1 changed files with 10 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue