mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
remove instances where a pointer is used in a foreach loop for value (#7108)
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
$sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/switch/resources/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
$xml_files = glob($sip_profile_dir);
|
||||
foreach ($xml_files as $x => &$xml_file) {
|
||||
foreach ($xml_files as $x => $xml_file) {
|
||||
//load the sip profile xml and save it into an array
|
||||
$sip_profile_xml = file_get_contents($xml_file);
|
||||
$xml = simplexml_load_string($sip_profile_xml);
|
||||
@@ -165,7 +165,7 @@
|
||||
$sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/switch/resources/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
$xml_files = glob($sip_profile_dir);
|
||||
foreach ($xml_files as $x => &$xml_file) {
|
||||
foreach ($xml_files as $x => $xml_file) {
|
||||
//load the sip profile xml and save it into an array
|
||||
$sip_profile_xml = file_get_contents($xml_file);
|
||||
$xml = simplexml_load_string($sip_profile_xml);
|
||||
|
||||
@@ -92,7 +92,7 @@ if (is_uuid($sip_profile_uuid) && $sip_profile_name != '') {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$array['sip_profile_domains'][$x]['sip_profile_domain_uuid'] = uuid();
|
||||
$array['sip_profile_domains'][$x]['sip_profile_uuid'] = $sip_profile_uuid_new;
|
||||
$array['sip_profile_domains'][$x]['sip_profile_domain_name'] = $row["sip_profile_domain_name"];
|
||||
@@ -109,7 +109,7 @@ if (is_uuid($sip_profile_uuid) && $sip_profile_name != '') {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$array['sip_profile_settings'][$x]['sip_profile_setting_uuid'] = uuid();
|
||||
$array['sip_profile_settings'][$x]['sip_profile_uuid'] = $sip_profile_uuid_new;
|
||||
$array['sip_profile_settings'][$x]['sip_profile_setting_name'] = $row["sip_profile_setting_name"];
|
||||
|
||||
Reference in New Issue
Block a user