set max argument length to 4000

This commit is contained in:
Robin Appelman 2015-02-23 18:07:13 +01:00
parent bf65b1f18b
commit 3cf237df67
2 changed files with 2 additions and 2 deletions

View File

@ -979,7 +979,7 @@
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>2048</length>
<length>4000</length>
</field>
<field>

View File

@ -57,7 +57,7 @@ class JobList implements IJobList {
$class = $job;
}
$argument = json_encode($argument);
if (strlen($argument) > 2048) {
if (strlen($argument) > 4000) {
throw new \InvalidArgumentException('Background job arguments cant exceed 2048 characters (json encoded');
}
$query = $this->conn->prepare('INSERT INTO `*PREFIX*jobs`(`class`, `argument`, `last_run`) VALUES(?, ?, 0)');