Commit 41beb175 authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Frédéric Buclin

Bug 645433: Bugzilla->error_mode( ERROR_MODE_WEBPAGE ) doesn't change Bugzilla->error_mode

r/a=LpSolit
parent 4862600f
......@@ -445,8 +445,14 @@ sub error_mode {
if (defined $newval) {
$class->request_cache->{error_mode} = $newval;
}
return $class->request_cache->{error_mode}
|| (i_am_cgi() ? ERROR_MODE_WEBPAGE : ERROR_MODE_DIE);
# XXX - Once we require Perl 5.10.1, this test can be replaced by //.
if (exists $class->request_cache->{error_mode}) {
return $class->request_cache->{error_mode};
}
else {
return (i_am_cgi() ? ERROR_MODE_WEBPAGE : ERROR_MODE_DIE);
}
}
# This is used only by Bugzilla::Error to throw errors.
......
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