We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7793b2a commit 703a993Copy full SHA for 703a993
1 file changed
src/Extension.php
@@ -59,7 +59,7 @@ public function initialize()
59
public function contentParser(Content $content)
60
{
61
foreach ($content->contenttype['fields'] as $key => $options) {
62
- if ($options['type'] == 'array') {
+ if ($options['type'] == 'array' && is_string($content->values[$key])) {
63
$values = json_decode($content->values[$key], true);
64
$content->values[$key] = array_values($values);
65
}
@@ -84,7 +84,7 @@ public function getChildrenContexts(array $context, $key)
84
$values = array();
85
if (array_key_exists($key, $parentValues)) {
86
$json = json_decode($parentValues[$key], true);
87
- $values = ($json) ? array_values($json) : array();
+ $values = $json?array_values($json):array();
88
89
90
foreach ($values as $num => $vFields) {
0 commit comments