From 5f8e50dc66ed76a3c323836e30ac51a5a05b04aa Mon Sep 17 00:00:00 2001
From: Robert Allerstorfer <roball@405360.no-reply.drupal.org>
Date: Sun, 17 May 2015 13:57:03 +0200
Subject: [PATCH] Only include E_DEPRECATED in error bitmask if it is defined

---
 includes/common.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/includes/common.inc b/includes/common.inc
index 19798ba..88c76d8 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -672,7 +672,9 @@ function drupal_error_handler($errno, $message, $filename, $line, $context) {
     return;
   }
 
-  if ($errno & (E_ALL ^ E_DEPRECATED)) {
+  $error_bitmask = E_ALL;
+  defined('E_DEPRECATED') && $error_bitmask = $error_bitmask & ~E_DEPRECATED;
+  if ($errno & $error_bitmask) {
     $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning', 4096 => 'recoverable fatal error');
 
     // For database errors, we want the line number/file name of the place that
-- 
1.9.5

