Bug 980234: Testopia crashes if a component has no default QA contact

git-svn-id: svn://10.0.0.236/trunk@265362 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-04-28 14:30:19 +00:00
parent 56b428ce95
commit 70dba43c4b
4 changed files with 6 additions and 14 deletions

View File

@ -1 +1 @@
666
667

View File

@ -1 +1 @@
53032c90814dabc0112de33affb16993b7304d56
f536f83f343151cb0cfc1eff00c7e9434c23c6d6

View File

@ -1,7 +1,7 @@
<?php
// by Edd Dumbill (C) 1999-2002
// <edd@usefulinc.com>
// $Id: .xmlrpc.inc.php,v 1.29 2014-04-28 14:00:19 bzrmirror%bugzilla.org Exp $
// $Id: .xmlrpc.inc.php,v 1.30 2014-04-28 14:30:19 bzrmirror%bugzilla.org Exp $
// Copyright (c) 1999,2000,2002 Edd Dumbill.
// All rights reserved.

View File

@ -451,19 +451,11 @@ else{
my @comps;
foreach my $c (@{$product->components}) {
if ($cgi->param('query')){
if (!$cgi->param('query') || $c->name =~ m/$q/i) {
push @comps, {
'id' => $c->id,
'name' => $c->name,
'qa_contact' => $c->default_qa_contact->login,
'product' => $c->product->name,
} if ($c->name =~ m/$q/i);
}
else {
push @comps, {
'id' => $c->id,
'name' => $c->name,
'qa_contact' => $c->default_qa_contact->login,
'qa_contact' => $c->default_qa_contact ? $c->default_qa_contact->login : '',
'product' => $c->product->name,
};
}