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>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -227,6 +227,14 @@
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $x => $row) {
|
||||
|
||||
//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;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2019-2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2019-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -269,6 +269,14 @@
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$x = 0;
|
||||
foreach ($rows as $row) {
|
||||
//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;
|
||||
|
||||
@@ -286,7 +294,6 @@
|
||||
//save the changes and set the message
|
||||
if (!empty($array) && is_array($array) && @sizeof($array) != 0) {
|
||||
//save the array
|
||||
|
||||
$this->database->save($array);
|
||||
unset($array);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user