Closed
Bug 136754
Opened 23 years ago
Closed 23 years ago
warning in editproduct.cgi if usebuggroups option is on
Categories
(Bugzilla :: Administration, task, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: cedric.caron, Assigned: justdave)
Details
Attachments
(1 file)
609 bytes,
patch
|
bbaetz
:
review+
gerv
:
review+
|
Details | Diff | Splinter Review |
if the usebuggroups option is turned on I receive the folowing warning in editproducts.cgi when I select a product to edit Use of uninitialized value in substitution (s///) at CGI.pl line 372 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 372. Use of uninitialized value in substitution (s///) at CGI.pl line 373 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 373. Use of uninitialized value in substitution (s///) at CGI.pl line 374 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 374. Use of uninitialized value in substitution (s///) at CGI.pl line 375 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 375. Use of uninitialized value in substitution (s///) at CGI.pl line 379 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 379. Use of uninitialized value in substitution (s///) at CGI.pl line 380 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 380. Use of uninitialized value in substitution (s///) at CGI.pl line 381 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 381. Use of uninitialized value in substitution (s///) at CGI.pl line 382 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 382. Use of uninitialized value in concatenation (.) or string at C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi line 119 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in concatenation (.) or string at C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi line 119. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 372. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 373. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 374. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 375. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 379. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 380. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 381. [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in substitution (s///) at CGI.pl line 382. Use of uninitialized value in concatenation (.) or string at C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi line 789 (#1) [Thu Apr 11 01:38:26 2002] C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi: Use of uninitialized value in concatenation (.) or string at C:\DL\Devlopment\BugZilla\current\mozilla\webtools\bugzilla\editproducts.cgi line 789.
Updated•23 years ago
|
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.16
Assignee | ||
Comment 1•23 years ago
|
||
Cedric: can you find value_quote in CGI.pl and add this to it: sub value_quote { my ($var) = (@_); + if (!defined $var) { + confess "value_quote() called with an undefined value"; + } $var =~ s/\&/\&/g; $var =~ s/</\</g; $var =~ s/>/\>/g; Then post the results of the new error log after running it with that? This will get us a stack trace to find out where value_quote is being called from with an undefined value. Should we fix the source or should we make value_quote() assume "" when you pass it undef?
Comment 2•23 years ago
|
||
Fix the source ;)
Reporter | ||
Comment 3•23 years ago
|
||
I added the lines cgi.pl and receive the folowing error: value_quote() called with an undefined value at CGI.pl line 373 main::value_quote(undef) called at C:\Projects\bugzilla\Current\editproducts.cgi line 116 main::EmitFormElements('bozo premier', 'bozo', '', undef, 0, 0, 10000, 0, ...) called at C:\Projects\bugzilla\Current\editproducts.cgi line 702 to reproduce the problem: create a product with the option usebuggroups off turn to option usebuggroups on edit the created product
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 4•23 years ago
|
||
Changes the call that loads the userregexp to assume an empty regexp if the regexp is null in the database.
Comment 5•23 years ago
|
||
Comment on attachment 78853 [details] [diff] [review] Patch v1 Well, my regexps are empty, not null - any idea how they got that way? r=bbaetz - while I can't test this, the fix appears obvious.
Attachment #78853 -
Flags: review+
Reporter | ||
Comment 6•23 years ago
|
||
you can create a NULL regexp with the folowings steps create a product with the option usebuggroups off turn to option usebuggroups on edit the created product
Reporter | ||
Comment 7•23 years ago
|
||
IMO the best solution to this problem is to modify the product creation to set the regexp to empty when usebuggroups is off. add code in checksetup.pl to fix the current database this remove unneeded test and make sure we don't forget an other test semewere in the code
Comment 8•23 years ago
|
||
I tried that, and couldn't reproduce it - its set to the empty string, not NULL. Maybe this is a hangover from a previous version, or something? In any event, I don't hav a problem with the patch
Reporter | ||
Comment 9•23 years ago
|
||
On my system with the CVS version of bugzila, perl 5.6.1 under windows 2000 I can reproduce the problem. meaby this line is not interpreted the same way depending on "something" my $userregexp = trim($::FORM{userregexp} || ''); if the option usebuggroups is turned off the form dosn't contain this field
Comment 10•23 years ago
|
||
Comment on attachment 78853 [details] [diff] [review] Patch v1 r=gerv. Gerv
Attachment #78853 -
Flags: review+
Comment 11•23 years ago
|
||
Fixed. (another trivial one.) Checking in editproducts.cgi; /cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v <-- editproducts.cgi new revision: 1.23; previous revision: 1.22 done Let's get that 2.16 list shorter :-) Gerv
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•