deprecated in php 7.4
authordemeritcowboy <demeritcowboy@hotmail.com>
Fri, 8 Jan 2021 13:15:25 +0000 (08:15 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Fri, 8 Jan 2021 13:15:25 +0000 (08:15 -0500)
CRM/Utils/String.php
Civi/Core/Paths.php

index 8e761a5be8231f11393b9cc4accd14d4c817571c..f98d4ec6d5c7ca00a3802ec8808e115b699c9b70 100644 (file)
@@ -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;
   }
index b35e11e14cee6e2a25bba04bdb05786e415a307a..aaab990d388d2c86fcf79271a9a675b461326be6 100644 (file)
@@ -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];
     }