diff --git a/classes/OAuth.class.php b/classes/OAuth.class.php
index a71768ab5ef4f172ae0e1d3d5b5d5ab786a9f718..d9c3cbb82aecfc8950d26234a6ae371fafca93b4 100755
--- a/classes/OAuth.class.php
+++ b/classes/OAuth.class.php
@@ -121,7 +121,7 @@ class OAuth {
 
             header("Location: ".$url);
             exit;
-        } elseif ($json['error']) {
+        } elseif (!empty($json['error'])) {
             \PageLayout::postError(_("Authentifizierungsfehler:")." ".$json['error']);
         } else {
             if (\Studip\ENV === "development") {