Commit cfb4d31f authored by Dries's avatar Dries

- Added missing quotes, initialized a variable an improved the error reporting

  a little.
parent 81b05c67
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment