MDL-76415 report_eventlist: Fixed str interpolation deprecations.

Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when
the expression inside the braces resolves to a variable or an expression.
This commit is contained in:
Meirza 2023-01-26 10:05:09 +07:00
parent 2a33c2736a
commit 5265300706

View file

@ -66,11 +66,11 @@ class report_eventlist_list_generator {
if ($detail) { if ($detail) {
$reflectionclass = new ReflectionClass($event); $reflectionclass = new ReflectionClass($event);
if (!$reflectionclass->isAbstract()) { if (!$reflectionclass->isAbstract()) {
$eventinformation = self::format_data($eventinformation, "\\${event}"); $eventinformation = self::format_data($eventinformation, "\\{$event}");
} }
} else { } else {
$parts = explode('\\', $event); $parts = explode('\\', $event);
$eventinformation["\\${event}"] = array_shift($parts); $eventinformation["\\{$event}"] = array_shift($parts);
} }
} }
} }