From 1cab74e41576aef74fc8a95ee30f453d02813fb9 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Fri, 1 Jun 2018 14:46:40 +0200
Subject: [PATCH] Fix autoloader

Can't use namespaced classes at this point yet
---
 lib/_autoload.php | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/_autoload.php b/lib/_autoload.php
index d613a5e95..7f96e6660 100644
--- a/lib/_autoload.php
+++ b/lib/_autoload.php
@@ -8,15 +8,15 @@
  * @package SimpleSAMLphp
  */
 
-// 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);
-} else {  // SSP is loaded as a library
-    $libpath = \SimpleSAML\Utils\System::resolvePath(dirname(dirname(__FILE__)).'/../../autoload.php');
-    if (file_exists($libpath)) {
-        require_once($libpath);
-    } else {
-        throw new Exception('Unable to load Composer autoloader');
-    }
+if (file_exists(dirname(dirname(__FILE__)).'/vendor/autoload.php')) {
+    // SSP is loaded as a separate project
+    require_once dirname(dirname(__FILE__)).'/vendor/autoload.php';
+} else if (file_exists(dirname(dirname(__FILE__)).'/../../autoload.php')) {
+    // SSP is loaded as a library
+    require_once dirname(dirname(__FILE__)).'/../../autoload.php';
+} else if (file_exists('/../../autoload.php')) {
+    // Windows version
+    require_once '/../../autoload.php';
+} else {
+    throw new Exception('Unable to load Composer autoloader');
 }
-- 
GitLab