Skip to content

Commit

Permalink
MDL-76362 h5p: Use string as default lang param
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jan 23, 2023
1 parent e76b1bc commit 6ae3f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h5p/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
$minor = optional_param('minorVersion', 0, PARAM_INT);

// Normalise Moodle language using underscore, as opposed to H5P which uses dash.
$language = optional_param('default-language', null, PARAM_RAW);
$language = clean_param(str_replace('-', '_', $language ?? ''), PARAM_LANG);
$language = optional_param('default-language', '', PARAM_RAW);
$language = clean_param(str_replace('-', '_', $language), PARAM_LANG);

if (!empty($name)) {
$editor->ajax->action(H5PEditorEndpoints::SINGLE_LIBRARY, $name,
Expand Down

0 comments on commit 6ae3f79

Please sign in to comment.