summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-09-19 17:35:42 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-09-19 17:35:42 +0200
commitf6e2d728bc63bc8f92093d5285195abfd7e7d7dd (patch)
tree4c861fcdd8839d52209b22b15e009f8a3a1e7d45 /Bugzilla/Bug.pm
parentf856ddacf27cc4271a471412e31d833687a73f18 (diff)
downloadbugzilla-f6e2d728bc63bc8f92093d5285195abfd7e7d7dd.tar.gz
bugzilla-f6e2d728bc63bc8f92093d5285195abfd7e7d7dd.tar.xz
Bug 686904: Removing an invalid URL from the See Also field crashes Bugzilla
r=timello a=LpSolit
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 2b526588f..b2afe6972 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2886,7 +2886,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} },
@@ -3400,7 +3401,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);