check_languages bustage

RESOLVED FIXED in Bugzilla 2.18

Status

()

Bugzilla
Administration
RESOLVED FIXED
14 years ago
5 years ago

People

(Reporter: Christian Reis, Assigned: Christian Reis)

Tracking

2.17.6
Bugzilla 2.18
x86
Linux
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

14 years ago
check_languages looks at $_, which is undefined. It should really be looking at
$_[0].
(Assignee)

Comment 1

14 years ago
Created attachment 135924 [details] [diff] [review]
kiko_v1: fix
(Assignee)

Updated

14 years ago
Attachment #135924 - Flags: review?(myk)
So this would never have worked? Or it would have worked sometimes?

Gerv
Based on the change, I would suspect it never worked.  Which is strange because
I could swear there were folks who tested it.
(Assignee)

Comment 4

14 years ago
Seems to have been broken when we sanitized languages in bug 199502:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/webtools/bugzilla/defparams.pl
for reference.
Status: NEW → ASSIGNED
Comment on attachment 135924 [details] [diff] [review]
kiko_v1: fix

r=myk

Hmm, looks like this code could be simplified by splitting on /[,\s]+/, which
would eliminate the need for trims further down in the code, ala:

    my @languages = split /[,\s+]/, trim($_[0]);
    if(!scalar(@languages)) {
       return "You need to specify a language tag."
    }
    foreach my $language (@languages) {
       if(   ! -d 'template/$language/custom' 
	  && ! -d 'template/$language/default') {

(No need to delay this patch for that, though.)
Attachment #135924 - Flags: review?(myk) → review+
Flags: approval+
(Assignee)

Comment 6

14 years ago
Created attachment 136011 [details] [diff] [review]
patch checked in
Attachment #135924 - Attachment is obsolete: true
(Assignee)

Comment 7

14 years ago
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v  <--  defparams.pl
new revision: 1.120; previous revision: 1.119

Thanks.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 8

14 years ago
Thanks for the fix. This looks really looks like a:

schroedinbug

<jargon, programming> /shroh'din-buhg/ (MIT, from the Schroedinger's Cat
thought-experiment in quantum physics) A design or implementation bug in a
program that doesn't manifest until someone reading source or using the program
in an unusual way notices that it never should have worked, at which point the
program promptly stops working for everybody until fixed. Though (like bit rot)
this sounds impossible, it happens; some programs have harboured latent
schroedinbugs for years.

Compare heisenbug, Bohr bug, mandelbug

> Based on the change, I would suspect it never worked.  Which is strange
> because I could swear there were folks who tested it.
Hmm, I think I tested all combinations, but (see above) they didn't work.
Target Milestone: --- → Bugzilla 2.18
*** Bug 233644 has been marked as a duplicate of this bug. ***
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.