From: tschuettler Date: Thu, 17 Mar 2022 16:14:41 +0000 (+0100) Subject: [NFC] - Compatibility for PHP-7.4/PHP-8 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=517bd5a9099f534e2c6402cc9abe8696df0c01d0;p=civicrm-core.git [NFC] - Compatibility for PHP-7.4/PHP-8 There are a few more leftovers under vendor and packages: `find . -name "*.php" -exec php -l {} \; | grep -v "No"`. Not sure how to deal with that. --- diff --git a/Civi/Core/Event/EventPrinter.php b/Civi/Core/Event/EventPrinter.php index 0c2cfb6235..74091efd1d 100644 --- a/Civi/Core/Event/EventPrinter.php +++ b/Civi/Core/Event/EventPrinter.php @@ -18,7 +18,7 @@ class EventPrinter { */ public static function formatName($callback): string { $normalizeNamespace = function($symbol) { - return $symbol{0} === '\\' ? substr($symbol, 1) : $symbol; + return $symbol[0] === '\\' ? substr($symbol, 1) : $symbol; }; if (is_array($callback)) { [$a, $b] = $callback;