summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index afa3cb3bc..0e0dfadfe 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -29,7 +29,8 @@ function conf_init() {
function error_handler($errno, $message, $filename, $line, $variables) {
$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");
$entry = $types[$errno] .": $message in $filename on line $line.";
- if (($errno == 1 || $errno == 2 || $errno == 4 || $errno == 256) && error_reporting()) {
+
+ if ($errno & E_ALL ^ E_NOTICE) {
watchdog("error", $types[$errno] .": $message in $filename on line $line.");
print "<pre>$entry</pre>";
}
@@ -675,6 +676,8 @@ function page_set_cache() {
function page_get_cache() {
global $user, $REQUEST_METHOD;
+ $cache = NULL;
+
if (!$user->uid && $REQUEST_METHOD == "GET") {
$cache = cache_get(request_uri());
@@ -753,7 +756,7 @@ function format_name($object) {
$output = $object->name;
}
else {
- $output = t(variable_get(anonymous, "Anonymous"));
+ $output = t(variable_get("anonymous", "Anonymous"));
}
return $output;