From b05c0534b407785c53a1f7b29766260855cf8870 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 5 Aug 2024 16:56:51 -0600 Subject: [PATCH] Send the database object into the function --- app/vars/app_defaults.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/vars/app_defaults.php b/app/vars/app_defaults.php index c72ca39bc6..0e82786ec4 100644 --- a/app/vars/app_defaults.php +++ b/app/vars/app_defaults.php @@ -114,10 +114,7 @@ if ($domains_processed == 1) { //set country depend variables as country code and international direct dialing code (exit code) if (!function_exists('set_country_vars')) { - function set_country_vars($x) { - //import the database object - global $database; - + function set_country_vars($database, $x) { //include the countrries require "resources/countries.php"; @@ -214,7 +211,7 @@ if ($domains_processed == 1) { } //set country code variables - set_country_vars($x); + set_country_vars($database, $x); //save the vars.xml file save_var_xml();