//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");
}
*/
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
public function getAvailable() {
$result = [];
foreach ($this->getAll() as $key => $theme) {
- if ($key{0} !== '_') {
+ if ($key[0] !== '_') {
$result[$key] = $theme['title'];
}
}