Sfoglia il codice sorgente

Functions: Update format_phone() function for PHP 8.1

fusionate 2 anni fa
parent
commit
891dcb1038
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      resources/functions.php

+ 1 - 1
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) {