From 1bb2d450243500cd237bd9d64df38df64df06dcd Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 7 Mar 2016 05:21:49 +0000 Subject: Bug 1252084 - Warning when entering row into user_request_log when running commandline script --- Bugzilla.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bugzilla.pm b/Bugzilla.pm index 0ce152e48..021783a75 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -615,7 +615,8 @@ sub switch_to_main_db { sub log_user_request { my ($class, $bug_id, $attach_id, $action) = @_; - return unless Bugzilla->params->{log_user_requests}; + return unless (i_am_cgi() || i_am_webservice()) + && Bugzilla->params->{log_user_requests}; my $cgi = $class->cgi; my $user_id = $class->user->id; -- cgit v1.2.3-24-g4f1b