summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-09-19 17:36:53 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-09-19 17:36:53 +0200
commit4d7f8b007dc0bac0ef2924302dbe2bdc0c049452 (patch)
tree2bb2c1030517fefe84ef20aa383b104987df7d7f /Bugzilla
parentb5113d4856d08dd2b1ce921c2f2f37985b2f4626 (diff)
downloadbugzilla-4d7f8b007dc0bac0ef2924302dbe2bdc0c049452.tar.gz
bugzilla-4d7f8b007dc0bac0ef2924302dbe2bdc0c049452.tar.xz
Bug 686904: Removing an invalid URL from the See Also field crashes Bugzilla
r=timello a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index e5b288f25..175bcd050 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2889,7 +2889,8 @@ sub remove_see_also {
# Since we remove also the url from the referenced bug,
# we need to notify changes for that bug too.
$removed_bug_url = $removed_bug_url->[0];
- if ($removed_bug_url->isa('Bugzilla::BugUrl::Bugzilla::Local')
+ if ($removed_bug_url
+ and $removed_bug_url->isa('Bugzilla::BugUrl::Bugzilla::Local')
and defined $removed_bug_url->ref_bug_url)
{
push @{ $self->{see_also_changes} },
@@ -3383,7 +3384,7 @@ sub reporter {
sub see_also {
my ($self) = @_;
return [] if $self->{'error'};
- if (!defined $self->{see_also}) {
+ if (!exists $self->{see_also}) {
my $ids = Bugzilla->dbh->selectcol_arrayref(
'SELECT id FROM bug_see_also WHERE bug_id = ?',
undef, $self->id);