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
Thomas Horn Sivertsen 2019-03-21 10:30:09 +01:00 committed by Frode Petterson
parent d4931ec20a
commit 4525d6383f
1 changed files with 1 additions and 1 deletions

View File

@ -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') . '}';
} }