Commit da309367 authored by Byron Jones's avatar Byron Jones

Bug 744691: Throw an error early when calling a method from a non-existent class

r=dkl, a=LpSolit
parent 2c366369
...@@ -15,6 +15,7 @@ use Scalar::Util qw(blessed); ...@@ -15,6 +15,7 @@ use Scalar::Util qw(blessed);
sub handle_login { sub handle_login {
my ($self, $class, $method, $full_method) = @_; my ($self, $class, $method, $full_method) = @_;
ThrowCodeError('unknown_method', {method => $full_method}) if !$class;
eval "require $class"; eval "require $class";
ThrowCodeError('unknown_method', {method => $full_method}) if $@; ThrowCodeError('unknown_method', {method => $full_method}) if $@;
return if ($class->login_exempt($method) return if ($class->login_exempt($method)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment