diff options
m--------- | 3rdparty | 0 | ||||
-rw-r--r-- | lib/private/Command/ClosureJob.php | 3 | ||||
-rw-r--r-- | tests/lib/Command/CronBusTest.php | 7 |
3 files changed, 1 insertions, 9 deletions
diff --git a/3rdparty b/3rdparty -Subproject ed6ea207de9e7649d5f7321497a27f5612d6e10 +Subproject a983a316487c666d6602923f0c067e32299501b diff --git a/lib/private/Command/ClosureJob.php b/lib/private/Command/ClosureJob.php index 5639852e4db..180c5a33ec5 100644 --- a/lib/private/Command/ClosureJob.php +++ b/lib/private/Command/ClosureJob.php @@ -24,11 +24,10 @@ 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, [LaravelClosure::class, OpisClosure::class]); + $callable = unserialize($serializedCallable, [LaravelClosure::class]); $callable = $callable->getClosure(); if (is_callable($callable)) { $callable(); diff --git a/tests/lib/Command/CronBusTest.php b/tests/lib/Command/CronBusTest.php index 100de0a861c..ea610a135d8 100644 --- a/tests/lib/Command/CronBusTest.php +++ b/tests/lib/Command/CronBusTest.php @@ -47,11 +47,4 @@ class CronBusTest extends AsyncBusTest { $job->execute($this->jobList); } } - - public function testClosureFromPreviousVersion() { - $serializedClosure = 'C:32:"Opis\\Closure\\SerializableClosure":217:{a:5:{s:3:"use";a:0:{}s:8:"function";s:64:"function () {\\Test\\Command\\AsyncBusTest::$lastCommand = \'opis\';}";s:5:"scope";s:24:"Test\\Command\\CronBusTest";s:4:"this";N;s:4:"self";s:32:"0000000027dcfe2f00000000407fa805";}}'; - $this->jobList->add('OC\Command\ClosureJob', $serializedClosure); - $this->runJobs(); - $this->assertEquals('opis', AsyncBusTest::$lastCommand); - } } |