]> 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:20:16 +0000 (14:20 +0800)
committerByron Jones <bjones@mozilla.com>
Thu, 24 May 2012 06:20:16 +0000 (14:20 +0800)
r=dkl, a=LpSolit

Bugzilla/WebService/Server.pm

index 01ff907cd1ab9bcd3041057889f06f49305f5981..a43ed204c9ac728911cd1902d262a027cb85f128 100644 (file)
@@ -15,6 +15,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)