----------------------------------------
* CRM-20649: Notice error when creating Price set
https://issues.civicrm.org/jira/browse/CRM-20649
}
//checks the given price set doesnot start with digit
$title = $fields['title'];
- // gives the ascii value
- $asciiValue = ord($title{0});
- if ($asciiValue >= 48 && $asciiValue <= 57) {
- $errors['title'] = ts("Name cannot not start with a digit");
+ if ($title) {
+ // gives the ascii value
+ $asciiValue = ord($title{0});
+ if ($asciiValue >= 48 && $asciiValue <= 57) {
+ $errors['title'] = ts("Name cannot not start with a digit");
+ }
}
return empty($errors) ? TRUE : $errors;
}