Incorrect json (#58)
Default language is of type text and should therefore add quotes around the value like source, license and license_version do.pull/61/head
parent
d4931ec20a
commit
4525d6383f
|
@ -65,7 +65,7 @@ abstract class H5PMetadata {
|
||||||
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
|
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
|
||||||
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
|
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
|
||||||
',"changes":' . (isset($content->changes) ? $content->changes : 'null') .
|
',"changes":' . (isset($content->changes) ? $content->changes : 'null') .
|
||||||
',"defaultLanguage":' . (isset($content->default_language) ? $content->default_language : 'null') .
|
',"defaultLanguage":' . (isset($content->default_language) ? '"' . $content->default_language . '"' : 'null') .
|
||||||
',"authorComments":' . (isset($content->author_comments) ? json_encode($content->author_comments) : 'null') . '}';
|
',"authorComments":' . (isset($content->author_comments) ? json_encode($content->author_comments) : 'null') . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue