summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-19 07:45:35 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-19 07:45:35 +0000
commit479bd2fe280965404a46ef34e69119990d3c1bb6 (patch)
tree4c720b26b075a32e7dd9961b545c2acc6876cfd7 /includes/common.inc
parent7645a1f46831df6cd14db70b6f5dd74d2a4aa1d8 (diff)
downloadbrdo-479bd2fe280965404a46ef34e69119990d3c1bb6.tar.gz
brdo-479bd2fe280965404a46ef34e69119990d3c1bb6.tar.bz2
#73615 by chx, Eaton, and Steven, Provide the full range of Drupal functions to .install files
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index ad795d393..82368d8dd 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -491,11 +491,16 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
* 1 = Log errors to database and to screen.
*/
function error_handler($errno, $message, $filename, $line) {
+ // If the @ error suppression operator was used, error_reporting is temporarily set to 0
+ if (error_reporting() == 0) {
+ return;
+ }
+
if ($errno & (E_ALL ^ E_NOTICE)) {
$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');
$entry = $types[$errno] .': '. $message .' in '. $filename .' on line '. $line .'.';
- // Note: force display of error messages in update.php
+ // Force display of error messages in update.php
if (variable_get('error_level', 1) == 1 || strstr($_SERVER['PHP_SELF'], 'update.php')) {
drupal_set_message($entry, 'error');
}