diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php
index c8d68591affa077c0b92f642cc7e5a26710a9c7f..fbf974bfae0b561b522025d1094995a3a5e9074d 100644
--- a/lib/SimpleSAML/Error/Error.php
+++ b/lib/SimpleSAML/Error/Error.php
@@ -50,7 +50,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception {
 			unset($this->parameters[0]);
 			$this->errorCode = $errorCode[0];
 		} else {
-			$parameters = array();
+			$this->parameters = array();
 			$this->errorCode = $errorCode;
 		}