From 20fd9f373b381df1bd45a270b67d2ce4624c9da1 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 8 Jan 2021 08:15:25 -0500 Subject: [PATCH] deprecated in php 7.4 --- CRM/Utils/String.php | 2 +- Civi/Core/Paths.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index 8e761a5be8..f98d4ec6d5 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -670,7 +670,7 @@ class CRM_Utils_String { $alphabetSize = strlen($alphabet); $result = ''; for ($i = 0; $i < $len; $i++) { - $result .= $alphabet{rand(1, $alphabetSize) - 1}; + $result .= $alphabet[rand(1, $alphabetSize) - 1]; } return $result; } diff --git a/Civi/Core/Paths.php b/Civi/Core/Paths.php index b35e11e14c..aaab990d38 100644 --- a/Civi/Core/Paths.php +++ b/Civi/Core/Paths.php @@ -243,7 +243,7 @@ class Paths { } $defaultContainer = self::DEFAULT_URL; - if ($value && $value{0} == '[' && preg_match(';^\[([a-zA-Z0-9\._]+)\](/(.*))$;', $value, $matches)) { + if ($value && $value[0] == '[' && preg_match(';^\[([a-zA-Z0-9\._]+)\](/(.*))$;', $value, $matches)) { $defaultContainer = $matches[1]; $value = $matches[3]; } -- 2.25.1