Fix for language containing empty string in H5P export (h5p.json)
parent
2727c1eb2d
commit
2d7824aa93
|
@ -1433,7 +1433,7 @@ Class H5PExport {
|
||||||
'title' => $content['title'],
|
'title' => $content['title'],
|
||||||
// TODO - stop using 'und', this is not the preferred way.
|
// TODO - stop using 'und', this is not the preferred way.
|
||||||
// Either remove language from the json if not existing, or use "language": null
|
// Either remove language from the json if not existing, or use "language": null
|
||||||
'language' => isset($content['language']) ? $content['language'] : 'und',
|
'language' => (isset($content['language']) && strlen(trim($content['language'])) !== 0) ? $content['language'] : 'und',
|
||||||
'mainLibrary' => $content['library']['name'],
|
'mainLibrary' => $content['library']['name'],
|
||||||
'embedTypes' => $embedTypes,
|
'embedTypes' => $embedTypes,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue