diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-04-21 12:36:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-04-21 12:36:09 +0000 |
commit | cfb4d31f65b39a51e61676662e2995037332b02c (patch) | |
tree | 4adfeb9899dcc0d2226d0f21bf433cb4f2199e04 /includes/common.inc | |
parent | 81b05c6795b891667772557ee1ae89dc725f3ebc (diff) | |
download | brdo-cfb4d31f65b39a51e61676662e2995037332b02c.tar.gz brdo-cfb4d31f65b39a51e61676662e2995037332b02c.tar.bz2 |
- Added missing quotes, initialized a variable an improved the error reporting
a little.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 7 |
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; |