aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Command/CronBus.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Command/CronBus.php')
-rw-r--r--lib/private/Command/CronBus.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Command/CronBus.php b/lib/private/Command/CronBus.php
index 89a739617d0..8749ad0bff5 100644
--- a/lib/private/Command/CronBus.php
+++ b/lib/private/Command/CronBus.php
@@ -26,6 +26,7 @@
namespace OC\Command;
use OCP\Command\ICommand;
+use Laravel\SerializableClosure\SerializableClosure;
class CronBus extends AsyncBus {
/**
@@ -67,9 +68,9 @@ class CronBus extends AsyncBus {
*/
private function serializeCommand($command) {
if ($command instanceof \Closure) {
- return \Opis\Closure\serialize($command);
+ return serialize(new SerializableClosure($command));
} elseif (is_callable($command) or $command instanceof ICommand) {
- return \Opis\Closure\serialize($command);
+ return serialize($command);
} else {
throw new \InvalidArgumentException('Invalid command');
}