Permalink
Browse files

Added handling of E_USER_DEPRECATED to ErrorHandler and Debugger.

  • Loading branch information...
1 parent 6f09f5d commit 94e5ec0545f051c64b0638e9c20fb3332e0c979e Thomas Ploch committed Feb 4, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −0 lib/Cake/Error/ErrorHandler.php
  2. +5 −1 lib/Cake/Utility/Debugger.php
  3. +4 −0 lib/Cake/bootstrap.php
@@ -217,6 +217,7 @@ public static function mapErrorCode($code) {
$log = LOG_NOTICE;
break;
case E_DEPRECATED:
+ case E_USER_DEPRECATED:
$error = 'Deprecated';
$log = LOG_NOTICE;
break;
@@ -241,6 +241,11 @@ public static function showError($code, $description, $file = null, $line = null
$error = 'Notice';
$level = LOG_NOTICE;
break;
+ case E_DEPRECATED:
+ case E_USER_DEPRECATED:
+ $error = 'Deprecated';
+ $level = LOG_NOTICE;
+ break;
default:
return;
break;
@@ -716,5 +721,4 @@ public static function checkSecurityKeys() {
trigger_error(__d('cake_dev', 'Please change the value of \'Security.cipherSeed\' in app/Config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE);
}
}
-
}
View
@@ -23,6 +23,10 @@
if (!defined('E_DEPRECATED')) {
define('E_DEPRECATED', 8192);
}
+
+if (!defined('E_USER_DEPRECATED')) {
+ define('E_USER_DEPRECATED', E_USER_NOTICE);
+}
error_reporting(E_ALL & ~E_DEPRECATED);
if (!defined('CAKE_CORE_INCLUDE_PATH')) {

0 comments on commit 94e5ec0

Please sign in to comment.