]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 744691: Throw an error early when calling a method from a non-existent class
authorByron Jones <bjones@mozilla.com>
Thu, 24 May 2012 06:17:50 +0000 (14:17 +0800)
committerByron Jones <bjones@mozilla.com>
Thu, 24 May 2012 06:17:50 +0000 (14:17 +0800)
r=dkl, a=LpSolit

Bugzilla/WebService/Server.pm

index 4e03152196563e1c661e07b2002ef6d1a060f0d8..feb80e9d025f15a39ea50cc1066945dfe671532c 100644 (file)
@@ -25,6 +25,7 @@ use Scalar::Util qw(blessed);
 
 sub handle_login {
     my ($self, $class, $method, $full_method) = @_;
+    ThrowCodeError('unknown_method', {method => $full_method}) if !$class;
     eval "require $class";
     ThrowCodeError('unknown_method', {method => $full_method}) if $@;
     return if ($class->login_exempt($method)