daily cron run outputs warning

RESOLVED WORKSFORME

Status

()

Bugzilla
Bugzilla-General
RESOLVED WORKSFORME
9 years ago
9 years ago

People

(Reporter: Florian La Roche, Unassigned)

Tracking

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009061613 CentOS/3.0.11-2.el5.centos Firefox/3.0.11
Build Identifier: 3.2.4

The daily cron run outputs the following warning:
Use of uninitialized value in string ne at Bugzilla/Util.pm line 290.

This is with 3.2.4 and the following patch should cure it:

--- Util.pm.lr  2009-07-27 23:09:21.000000000 +0200
+++ Util.pm     2009-07-27 23:11:13.000000000 +0200
@@ -287,7 +287,8 @@

 sub use_attachbase {
     my $attachbase = Bugzilla->params->{'attachment_base'};
-    return ($attachbase ne ''
+    return (defined $attachbase
+            && $attachbase ne ''
             && $attachbase ne Bugzilla->params->{'urlbase'}
             && $attachbase ne Bugzilla->params->{'sslbase'}) ? 1 : 0;
 }


Reproducible: Always

Actual Results:  
No warnings within the cron run

Comment 1

9 years ago
Bugzilla->params->{'attachment_base'} cannot be undefined. Did you run checksetup.pl before calling your daily cron job?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

9 years ago
Hello Frederic,

this is with "'allow_attachment_display' => 0" and then setting
"'attachment_base' => ''". checksetup.pl has also run ok.

regards,

Florian La Roche
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

Comment 3

9 years ago
Most likely this means that your cron doesn't have the correct permissions to read the data/params file in the Bugzilla directory, or that it's running from the wrong directory, or something?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 4

9 years ago
Ok, found it. Thanks for the prompt feedback,

Florian La Roche
You need to log in before you can comment on or make changes to this bug.