From 04da32d751b34859c15c31b4bf09ade30bf4a455 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@uvt.nl>
Date: Mon, 28 Apr 2014 16:45:18 +0200
Subject: [PATCH] Also check $errno against PHP's error_reporting.

This is necessary to make sure that if a minimum PHP error level
has been set, this is also respected by SSP's error handler. Most
notably, this will make calls prefixed with '@', the PHP warning
silencer, actually silence the warnings. The SSP code tries to
makes use of the @ sign on various places around the code, but
this will only work if it's actually checked here.
---
 www/_include.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/_include.php b/www/_include.php
index 071da63dd..c8f5e922b 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -54,7 +54,7 @@ function SimpleSAML_error_handler($errno, $errstr, $errfile = NULL, $errline = 0
 	}
 
 
-	if ($errno & SimpleSAML_Utilities::$logMask) {
+	if ($errno & SimpleSAML_Utilities::$logMask || ! ($errno & error_reporting() )) {
 		/* Masked error. */
 		return FALSE;
 	}
-- 
GitLab