diff --git a/src/JobPipeline.php b/src/JobPipeline.php index 2781ef0..137f34e 100644 --- a/src/JobPipeline.php +++ b/src/JobPipeline.php @@ -72,7 +72,7 @@ class JobPipeline implements ShouldQueue try { $result = app()->call($job); } catch (Throwable $exception) { - if (method_exists(get_class($job[0]), 'failed')) { + if (is_array($job) && method_exists(get_class($job[0]), 'failed')) { call_user_func_array([$job[0], 'failed'], [$exception]); } else { throw $exception;