diff --git a/modules/aselect/lib/Auth/Source/aselect.php b/modules/aselect/lib/Auth/Source/aselect.php
index c503361e1ab96567c040c7edd89bab4ce166d1c7..874b5ca72e2d4794bf4038380ea74e033dd52ca8 100644
--- a/modules/aselect/lib/Auth/Source/aselect.php
+++ b/modules/aselect/lib/Auth/Source/aselect.php
@@ -150,7 +150,7 @@ class sspmod_aselect_Auth_Source_aselect extends SimpleSAML_Auth_Source {
 		curl_close($curl);
 
 		if($str === false)
-			throw new SimpleSAML_Error_Exception("Unable to retrieve URL: $error");
+			throw new SimpleSAML_Error_Exception("Unable to retrieve URL: $err");
 
 		parse_str($str, $res);