Skip to content

Commit 5253e08

Browse files
committed
Merge 'bendmorris/patch-1' into old-pulls
Closes chrisboulton/php-resque#360
2 parents 5212318 + 1900618 commit 5253e08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Resque/Job.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ public function perform()
190190
Resque_Event::trigger('beforePerform', $this);
191191

192192
$instance = $this->getInstance();
193-
if(method_exists($instance, 'setUp')) {
193+
if(is_callable([$instance, 'setUp'])) {
194194
$instance->setUp();
195195
}
196196

197197
$result = $instance->perform();
198198

199-
if(method_exists($instance, 'tearDown')) {
199+
if(is_callable([$instance, 'tearDown'])) {
200200
$instance->tearDown();
201201
}
202202

0 commit comments

Comments
 (0)