Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/SimpleCAS/Autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,15 @@ function SimpleCAS_Autoload($class)
}

// set up __autoload
if (function_exists('spl_autoload_register')) {
if (!($_____t = spl_autoload_functions()) || !in_array('SimpleCAS_Autoload', spl_autoload_functions())) {
spl_autoload_register('SimpleCAS_Autoload');
if (function_exists('__autoload') && ($_____t === false)) {
// __autoload() was being used, but now would be ignored, add
// it to the autoload stack
spl_autoload_register('__autoload');
}
if (!($_____t = spl_autoload_functions()) || !in_array('SimpleCAS_Autoload', spl_autoload_functions())) {
spl_autoload_register('SimpleCAS_Autoload');
if (function_exists('__autoload') && ($_____t === false)) {
// __autoload() was being used, but now would be ignored, add
// it to the autoload stack
spl_autoload_register('__autoload');
}
unset($_____t);
} elseif (!function_exists('__autoload')) {
function __autoload($class) { return SimpleCAS_Autoload($class); }
}
unset($_____t);

// set up include_path if it doesn't register our current location
$____paths = explode(PATH_SEPARATOR, get_include_path());
Expand Down