Functions: Update format_phone() function for PHP 8.1

This commit is contained in:
fusionate
2023-06-01 23:22:39 +00:00
parent 408470b1d2
commit c8e8c5acd7

View File

@@ -797,7 +797,7 @@ function format_string($format, $data) {
//get the format and use it to format the phone number
function format_phone($phone_number) {
if (is_numeric(trim($phone_number, ' +'))) {
if (is_numeric(trim($phone_number ?? '', ' +'))) {
if (isset($_SESSION["format"]["phone"])) {
$phone_number = trim($phone_number, ' +');
foreach ($_SESSION["format"]["phone"] as &$format) {