mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Convert boolean values to a string before being copied (#7591)
* Convert boolean values to a string before being copied * Update access_controls.php * Update copyright year and handle boolean values Updated copyright year from 2019 to 2025 and added conversion of boolean values to strings in the database result processing. * Update call_block.php * Update call_center.php * Update call_flows.php * Update conference_controls.php * Update conference_profiles.php * Update conferences.php * Update device.php * Update dialplan.php * Update event_guard.php * Update extension_settings.php * Update fax.php * Update fax_queue.php * Update gateways.php * Update ivr_menu.php * Update number_translations.php * Update phrases.php * Update pin_numbers.php * Update ring_groups.php * Update streams.php * Update time_conditions.php * Update vars.php * Update email_templates.php * Update users.php * Update domains.php * Update groups.php * Update extension_copy.php * Update device_copy.php
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2024
|
||||
Copyright (C) 2010-2025
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -1323,6 +1323,14 @@
|
||||
foreach ($rows as $x => $row) {
|
||||
$primary_uuid = uuid();
|
||||
|
||||
//convert boolean values to a string
|
||||
foreach($row as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$row[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
@@ -1346,6 +1354,14 @@
|
||||
if (is_array($rows_2) && @sizeof($rows_2) != 0) {
|
||||
foreach ($rows_2 as $row_2) {
|
||||
|
||||
//convert boolean values to a string
|
||||
foreach($row_2 as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$row_2[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array['device_profile_keys'][$y] = $row_2;
|
||||
|
||||
@@ -1367,6 +1383,14 @@
|
||||
if (is_array($rows_3) && @sizeof($rows_3) != 0) {
|
||||
foreach ($rows_3 as $row_3) {
|
||||
|
||||
//convert boolean values to a string
|
||||
foreach($row_3 as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$row_3[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array['device_profile_settings'][$z] = $row_3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user