From e149971400579d26e7c2c163f1d1573aaf23b898 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sat, 9 Jan 2021 12:04:11 -0500 Subject: [PATCH] php 7.4 compatibility --- CRM/Custom/Form/Group.php | 2 +- CRM/Utils/Check/Component/Env.php | 4 ++-- Civi/Crypto/CryptoToken.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index 09cffc7533..9bf4be5e6f 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -136,7 +136,7 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { $title = $fields['title']; if (!empty($title)) { // gives the ascii value - $asciiValue = ord($title{0}); + $asciiValue = ord($title[0]); if ($asciiValue >= 48 && $asciiValue <= 57) { $errors['title'] = ts("Name cannot not start with a digit"); } diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 8b94015ea9..dc09691b9f 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -360,7 +360,7 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { foreach ($settingNames as $settingName) { $settingValue = Civi::settings()->get($settingName); - if (!empty($settingValue) && $settingValue{0} != '[') { + if (!empty($settingValue) && $settingValue[0] != '[') { $hasOldStyle = TRUE; break; } @@ -399,7 +399,7 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { foreach ($settingNames as $settingName) { $settingValue = Civi::settings()->get($settingName); - if (!empty($settingValue) && $settingValue{0} != '[') { + if (!empty($settingValue) && $settingValue[0] != '[') { $hasOldStyle = TRUE; break; } diff --git a/Civi/Crypto/CryptoToken.php b/Civi/Crypto/CryptoToken.php index 316159a3e4..afe415d844 100644 --- a/Civi/Crypto/CryptoToken.php +++ b/Civi/Crypto/CryptoToken.php @@ -77,7 +77,7 @@ class CryptoToken { * @return bool */ public function isPlainText($plainText) { - return is_string($plainText) && ($plainText === '' || $plainText{0} !== $this->delim); + return is_string($plainText) && ($plainText === '' || $plainText[0] !== $this->delim); } /** -- 2.25.1