Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. /* Add snippet to drupal_error_handler in
  2.  * includes/common.inc
  3.  */
  4. /**
  5.  * Log errors as defined by administrator.
  6.  *                                        
  7.  * Error levels:                          
  8.  * - 0 = Log errors to database.          
  9.  * - 1 = Log errors to database and to screen.
  10.  */                                          
  11. function drupal_error_handler($errno, $message, $filename, $line, $context) {
  12.   // If the @ error suppression operator was used, error_reporting will have
  13.   // been temporarily set to 0.                                              
  14.   if (error_reporting() == 0) {                                              
  15.     return;                                                                  
  16.   }                                                                          
  17.  
  18.   // E_NOTICE HACK
  19.   global $conf;  
  20.   if (!empty($conf['e_notice_suppress']) && ($errno == E_NOTICE)) {
  21.     return;                                                        
  22.   }                                                                
  23.   // END E_NOTICE HACK
  24.  
  25. /* Now add
  26.  * $conf['e_notice_suppress'];
  27.  */ to your settings.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement