From 3424aced2da6a2ccad1e230fc06df15514086cea Mon Sep 17 00:00:00 2001
From: Jaime Perez Crespo <jaime.perez@uninett.no>
Date: Wed, 2 Mar 2016 15:36:34 +0100
Subject: [PATCH] Bugfix: don't try to log anything before creating a class
 alias, as the logger itself might be subject to an alias.

---
 lib/_autoload_modules.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/_autoload_modules.php b/lib/_autoload_modules.php
index e17c187dd..f1fa42590 100644
--- a/lib/_autoload_modules.php
+++ b/lib/_autoload_modules.php
@@ -26,8 +26,8 @@ function temporaryLoader($class)
     $path = explode('_', $class);
     $new = join('\\', $path);
     if (class_exists($new, false)) {
-        SimpleSAML\Logger::warning("The class '$class' is now using namespaces, please use '$new'.");
         class_alias($new, $class);
+        SimpleSAML\Logger::warning("The class '$class' is now using namespaces, please use '$new'.");
     }
 
     $file = dirname(__FILE__).DIRECTORY_SEPARATOR.join(DIRECTORY_SEPARATOR, $path).'.php';
-- 
GitLab