Merge pull request #69 from stronk7/php74_curly_array_string_offset
Fix PHP 7.4 don't use curly braces for array/string offsetrevert-68-libraryPathSubclass wp-1.15.0
commit
541f6d8415
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
|
@ -2744,7 +2744,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;
|
||||
|
|
Loading…
Reference in New Issue