diff options
Diffstat (limited to 'lib/private/Command/ClosureJob.php')
-rw-r--r-- | lib/private/Command/ClosureJob.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Command/ClosureJob.php b/lib/private/Command/ClosureJob.php index 96b0947129e..5639852e4db 100644 --- a/lib/private/Command/ClosureJob.php +++ b/lib/private/Command/ClosureJob.php @@ -23,10 +23,13 @@ namespace OC\Command; use OC\BackgroundJob\QueuedJob; +use Laravel\SerializableClosure\SerializableClosure as LaravelClosure; +use Opis\Closure\SerializableClosure as OpisClosure; class ClosureJob extends QueuedJob { protected function run($serializedCallable) { - $callable = unserialize($serializedCallable)->getClosure(); + $callable = unserialize($serializedCallable, [LaravelClosure::class, OpisClosure::class]); + $callable = $callable->getClosure(); if (is_callable($callable)) { $callable(); } else { |