aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/command/queuebus.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/command/queuebus.php b/lib/private/command/queuebus.php
index e5604eb1fef..78712ebd9cd 100644
--- a/lib/private/command/queuebus.php
+++ b/lib/private/command/queuebus.php
@@ -41,6 +41,9 @@ class QueueBus implements IBus {
if ($command instanceof ICommand) {
// ensure the command can be serialized
$serialized = serialize($command);
+ if(strlen($serialized) > 4000) {
+ throw new \InvalidArgumentException('Trying to push a command which serialized form can not be stored in the database (>4000 character)');
+ }
$unserialized = unserialize($serialized);
$unserialized->handle();
} else {