diff --git a/lib/_autoload.php b/lib/_autoload.php index 7548e5852ab1c3d3c699b76ea9b3e87095b4f459..d613a5e9559317537a34de95845343803a23cd8f 100644 --- a/lib/_autoload.php +++ b/lib/_autoload.php @@ -10,12 +10,12 @@ // SSP is loaded as a separate project $libpath = \SimpleSAML\Utils\System::resolvePath(dirname(dirname(__FILE__)).'/vendor/autoload.php'); -if (file_exists($libpath) { - require_once $libpath; +if (file_exists($libpath)) { + require_once($libpath); } else { // SSP is loaded as a library $libpath = \SimpleSAML\Utils\System::resolvePath(dirname(dirname(__FILE__)).'/../../autoload.php'); - if (file_exists($libpath) { - require_once $libpath; + if (file_exists($libpath)) { + require_once($libpath); } else { throw new Exception('Unable to load Composer autoloader'); }