diff --git a/modules/openid/www/consumer.php b/modules/openid/www/consumer.php
index 94ac5316ea39f03f0361444611ced8a49b53c460..9676704c1c68e69e0fe4e7e8542926f013f64a12 100644
--- a/modules/openid/www/consumer.php
+++ b/modules/openid/www/consumer.php
@@ -4,8 +4,7 @@
  * Disable strict error reporting, since the OpenID library
  * used is PHP4-compatible, and not PHP5 strict-standards compatible.
  */
-$oldErrLevel = error_reporting();
-error_reporting($oldErrLevel & ~E_STRICT);
+SimpleSAML_Utilities::maskErrors(E_STRICT);
 
 require_once('Auth/OpenID/SReg.php');
 require_once('Auth/OpenID/Server.php');