summaryrefslogtreecommitdiffstats
path: root/lib/private/command
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/command')
-rw-r--r--lib/private/command/queuebus.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/command/queuebus.php b/lib/private/command/queuebus.php
index 953479086ca..e5604eb1fef 100644
--- a/lib/private/command/queuebus.php
+++ b/lib/private/command/queuebus.php
@@ -39,7 +39,10 @@ class QueueBus implements IBus {
*/
private function runCommand($command) {
if ($command instanceof ICommand) {
- $command->handle();
+ // ensure the command can be serialized
+ $serialized = serialize($command);
+ $unserialized = unserialize($serialized);
+ $unserialized->handle();
} else {
$command();
}