[REF] Fix some additional issues where curly braces were being used to access string...
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 13 Jun 2020 07:20:47 +0000 (17:20 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 13 Jun 2020 07:20:47 +0000 (17:20 +1000)
CRM/Custom/Form/Field.php
CRM/Utils/Number.php
Civi/Core/Themes.php

index b7597bfe5f12eab9b2e76488d54d8a8dbf1b48aa..a2ee643cbe3f9a5bd84c9a35ee996a610a7ac5b5 100644 (file)
@@ -618,7 +618,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
     //checks the given custom field name doesnot start with digit
     if (!empty($title)) {
       // gives the ascii value
-      $asciiValue = ord($title{0});
+      $asciiValue = ord($title[0]);
       if ($asciiValue >= 48 && $asciiValue <= 57) {
         $errors['label'] = ts("Name cannot not start with a digit");
       }
index ff254735958b65660c0c0ffb404c9fdb3b7385f7..3dae925661efe6b395d181f0055199a3f9f24253 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Utils_Number {
    */
   public static function formatUnitSize($size, $checkForPostMax = FALSE) {
     if ($size) {
-      $last = strtolower($size{strlen($size) - 1});
+      $last = strtolower($size[strlen($size) - 1]);
       $size = (int) $size;
       switch ($last) {
         // The 'G' modifier is available since PHP 5.1.0
index 9156eb55588d081372a7ebf1b35859b9b113001f..dee905485fdc24c5576ba2fd2a4f8846531fe6d4 100644 (file)
@@ -135,7 +135,7 @@ class Themes {
   public function getAvailable() {
     $result = [];
     foreach ($this->getAll() as $key => $theme) {
-      if ($key{0} !== '_') {
+      if ($key[0] !== '_') {
         $result[$key] = $theme['title'];
       }
     }