diff --git a/lib/Resque/Job.php b/lib/Resque/Job.php index f2e4193..31ad439 100755 --- a/lib/Resque/Job.php +++ b/lib/Resque/Job.php @@ -190,13 +190,13 @@ public function perform() Resque_Event::trigger('beforePerform', $this); $instance = $this->getInstance(); - if(method_exists($instance, 'setUp')) { + if(is_callable([$instance, 'setUp'])) { $instance->setUp(); } $result = $instance->perform(); - if(method_exists($instance, 'tearDown')) { + if(is_callable([$instance, 'tearDown'])) { $instance->tearDown(); }