diff options
author | mkanat%bugzilla.org <> | 2009-11-18 07:01:40 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-18 07:01:40 +0000 |
commit | bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d (patch) | |
tree | 4a6b0e7a7800545f9083fe70fed45e3c9c0d1edf /Bugzilla.pm | |
parent | Bug 529483: Release Notes for Bugzilla 3.4.4 (diff) | |
download | bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.tar.gz bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.tar.bz2 bugzilla-bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d.zip |
Fix for Bug 527505: Make t/001compile.t work even after Bugzilla::Install::CPAN messes with @INC, and make Bugzilla->feature work during mod_perl.pl.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index dc275b34f..3c547b980 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -555,7 +555,11 @@ sub local_timezone { sub request_cache { if ($ENV{MOD_PERL}) { require Apache2::RequestUtil; - return Apache2::RequestUtil->request->pnotes(); + # Sometimes (for example, during mod_perl.pl), the request + # object isn't available, and we should use $_request_cache instead. + my $request = eval { Apache2::RequestUtil->request }; + return $_request_cache if !$request; + return $request->pnotes(); } return $_request_cache; } |