diff --git a/lib/h5p/h5p-development.class.php b/lib/h5p/h5p-development.class.php index a60262a85d0..cae5433c044 100644 --- a/lib/h5p/h5p-development.class.php +++ b/lib/h5p/h5p-development.class.php @@ -67,7 +67,7 @@ class H5PDevelopment { $contents = scandir($path); for ($i = 0, $s = count($contents); $i < $s; $i++) { - if ($contents[$i]{0} === '.') { + if ($contents[$i][0] === '.') { continue; // Skip hidden stuff. } diff --git a/lib/h5p/h5p.classes.php b/lib/h5p/h5p.classes.php index a624cf8c49a..7654b2d9166 100644 --- a/lib/h5p/h5p.classes.php +++ b/lib/h5p/h5p.classes.php @@ -2757,7 +2757,7 @@ class H5PCore { foreach ($arr as $key => $val) { $next = -1; while (($next = strpos($key, '_', $next + 1)) !== FALSE) { - $key = substr_replace($key, strtoupper($key{$next + 1}), $next, 2); + $key = substr_replace($key, strtoupper($key[$next + 1]), $next, 2); } $newArr[$key] = $val; diff --git a/lib/h5p/readme_moodle.txt b/lib/h5p/readme_moodle.txt index 2eb2896e40e..846d9da4722 100644 --- a/lib/h5p/readme_moodle.txt +++ b/lib/h5p/readme_moodle.txt @@ -42,6 +42,8 @@ Hopefully, when upgrading, these patch won't be needed because it will be includ 2.2. Change all the mb_uses straight to the core_text() alternatives. Version 1.24 has 3 ocurrences in h5p.classes.php and 1 ocurrence in h5p-metadata.class.php. +3. Another PR has been sent to H5P library (https://github.com/h5p/h5p-php-library/pull/69) to fix some php74 minor problems. The same fix is being applied locally by MDL-67077. Once we import a new version, if it includes de fix, this won't be needed to reapply and can be removed. + The point 2 from above won't be needed once the mbstring extension becomes mandatory in Moodle. A request has been -sent to MDL-65809. \ No newline at end of file +sent to MDL-65809.