Upgrade to 3.5.7

This commit is contained in:
Bastian Allgeier
2021-07-02 11:34:29 +02:00
parent 5358f8885c
commit 62b533a28f
37 changed files with 329 additions and 233 deletions

View File

@@ -181,6 +181,13 @@ class BlocksField extends FieldClass
public function store($value)
{
$blocks = $this->blocksToValues((array)$value, 'content');
// returns empty string to avoid storing empty array as string `[]`
// and to consistency work with `$field->isEmpty()`
if (empty($blocks) === true) {
return '';
}
return $this->valueToJson($blocks, $this->pretty());
}