Skip to content
Snippets Groups Projects
Unverified Commit 1cab74e4 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Fix autoloader

Can't use namespaced classes at this point yet
parent 70f8bb54
No related branches found
No related tags found
No related merge requests found
...@@ -8,15 +8,15 @@ ...@@ -8,15 +8,15 @@
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
// SSP is loaded as a separate project if (file_exists(dirname(dirname(__FILE__)).'/vendor/autoload.php')) {
$libpath = \SimpleSAML\Utils\System::resolvePath(dirname(dirname(__FILE__)).'/vendor/autoload.php'); // SSP is loaded as a separate project
if (file_exists($libpath)) { require_once dirname(dirname(__FILE__)).'/vendor/autoload.php';
require_once($libpath); } else if (file_exists(dirname(dirname(__FILE__)).'/../../autoload.php')) {
} else { // SSP is loaded as a library // SSP is loaded as a library
$libpath = \SimpleSAML\Utils\System::resolvePath(dirname(dirname(__FILE__)).'/../../autoload.php'); require_once dirname(dirname(__FILE__)).'/../../autoload.php';
if (file_exists($libpath)) { } else if (file_exists('/../../autoload.php')) {
require_once($libpath); // Windows version
} else { require_once '/../../autoload.php';
throw new Exception('Unable to load Composer autoloader'); } else {
} throw new Exception('Unable to load Composer autoloader');
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment