Prevent additional PHP 8.1 errors

Make sure $record['checked'] is not empty
This commit is contained in:
FusionPBX 2023-06-05 17:44:06 -06:00 committed by GitHub
parent 8f59093604
commit 21f2a922d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ if (!class_exists('default_settings')) {
$x = 0;
foreach ($records as $record) {
//add to the array
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$array[$this->table][$x][$this->name.'_uuid'] = $record['uuid'];
}
@ -131,7 +131,7 @@ if (!class_exists('default_settings')) {
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@ -199,7 +199,7 @@ if (!class_exists('default_settings')) {
//get checked records
foreach($records as $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = $record['uuid'];
}
}
@ -329,4 +329,4 @@ if (!class_exists('default_settings')) {
} //class
}
?>
?>