]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1045782: Existing URLs in the See Also field should not throw an error when the...
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 5 Jan 2016 13:47:05 +0000 (14:47 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 5 Jan 2016 13:47:05 +0000 (14:47 +0100)
r/a=dkl

Bugzilla/BugUrl.pm

index 1e836ca1e8eabc2f2c0f059461069b286ec50a61..1d75fe8f108fc4d765b332c90419b5fab1ab7c3e 100644 (file)
@@ -108,8 +108,9 @@ sub _do_list_select {
     my $objects = $class->SUPER::_do_list_select(@_);
 
     foreach my $object (@$objects) {
-        eval "use " . $object->class; die $@ if $@;
-        bless $object, $object->class;
+        eval "use " . $object->class;
+        # If the class cannot be loaded, then we build a generic object.
+        bless $object, ($@ ? 'Bugzilla::BugUrl' : $object->class);
     }
 
     return $objects