mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
MDL-67077 h5p: php74 fix (curly braces) for the H5P lib
This has been sent also upstream @ https://github.com/h5p/h5p-php-library/pull/69
This commit is contained in:
parent
d547735f2f
commit
712a321db2
@ -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.
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
sent to MDL-65809.
|
||||
|
Loading…
x
Reference in New Issue
Block a user