From c8e8c5acd77880a2e97935a0b74936878aa57312 Mon Sep 17 00:00:00 2001 From: fusionate Date: Thu, 1 Jun 2023 23:22:39 +0000 Subject: [PATCH] Functions: Update format_phone() function for PHP 8.1 --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index e8f3311269..9e6600abc5 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -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) {