Closed Bug 197171 Opened 21 years ago Closed 21 years ago

report.cgi: Use of uninitialized value in numeric lt

Categories

(Bugzilla :: Reporting/Charting, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: edmudama, Assigned: gerv)

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Build Identifier: not relevant

With this query string:

http://mudweb.dyndns.org/bugzilla/report.cgi?
bug_file_loc_type=allwordssubstr&bug_status=NEW&bug_status=ASSIGNED&bug_status=R
EOPENED&bugidtype=include&chfieldto=Now&emailassigned_to1=1&emailassigned_to2=1&
emailcc2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field0-0-
0=noop&long_desc_type=substring&query_format=report-
graph&short_desc_type=allwordssubstr&type0-0-
0=noop&x_axis_field=product&action=wrap&format=bar&width=10&height=350

The default chart gives me this error dumped to /usr/log/apache/error_log:

report.cgi: Use of uninitialized value in numeric lt (<) 
at /var/htdocs/bugzilla/report.cgi line 217.

This always pops up when I first try a chart.

Hitting the "fatter" button on the chart page will then cause this error to not 
occur until I try to make it too narrow again. (or load a new chart, 
the "width" isn't saved)

Reproducible: Always

Steps to Reproduce:
1. go to any chart
2.
3.



Expected Results:  
I'd expect an extremely narrow graph instead

This was done with Bugzilla CVS TIPS as of 12:30AM MST 13-Mar-2003

Problem is with the $width variable in report.cgi
Only appears to happen the first time the system attempts to create a graph for 
a given data set.  Subsequent hits to the same data set don't generate the 
error in the apache log, not sure where this is getting cached. (don't know the 
system well enough)
Attached patch Patch v.1Splinter Review
Well spotted. This should fix the problem - we move the test to a place where
the width is guaranteed to be defined.

Gerv
Comment on attachment 117338 [details] [diff] [review]
Patch v.1

Joel: another small reports tweak, if you would be so kind. :-)

Gerv
Attachment #117338 - Flags: review?(bugreport)
Comment on attachment 117338 [details] [diff] [review]
Patch v.1

Dave: could you take a look at this? The problem is a bit more serious than it
appears - we do get the min_width wrong because of it - and the fix is simple.

Gerv
Attachment #117338 - Flags: review?(justdave)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #117338 - Flags: review?(justdave) → review+
Flags: approval?
Flags: approval? → approval+
Fixed.

Checking in template/en/default/reports/report.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/reports/report.html.tmpl,v
 <--  report.html.tmpl
new revision: 1.5; previous revision: 1.4
done

Gerv
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #117338 - Flags: review?(bugreport)
Target Milestone: --- → Bugzilla 2.18
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: