From b00f095d261015ebaf102e695585a2f69c00f5e2 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen Date: Wed, 11 Dec 2019 16:50:48 -0600 Subject: [PATCH] [#955] Update SimpleCAS to latest --- sites/all/libraries/SimpleCAS/Autoload.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/sites/all/libraries/SimpleCAS/Autoload.php b/sites/all/libraries/SimpleCAS/Autoload.php index b26f5a07..c13abe13 100755 --- a/sites/all/libraries/SimpleCAS/Autoload.php +++ b/sites/all/libraries/SimpleCAS/Autoload.php @@ -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'); - } - } - unset($_____t); -} elseif (!function_exists('__autoload')) { - function __autoload($class) { return SimpleCAS_Autoload($class); } +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); // set up include_path if it doesn't register our current location $____paths = explode(PATH_SEPARATOR, get_include_path());