Destinations [Class]: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-05-22 23:05:44 +00:00
parent a707462979
commit d0481896ba
No known key found for this signature in database
1 changed files with 4 additions and 4 deletions

View File

@ -93,9 +93,9 @@ if (!class_exists('destinations')) {
elseif ((isset($array['destination_prefix']) && isset($array['destination_number'])) || isset($array['destination_number'])) {
//set the variables
$destination_prefix = $array['destination_prefix'];
$destination_number = $array['destination_number'];
$destination_regex = $array['destination_number'];
$destination_prefix = $array['destination_prefix'] ?? null;
$destination_number = $array['destination_number'] ?? null;
$destination_regex = $array['destination_number'] ?? null;
//escape the plus
if (substr($destination_number, 0, 1) == "+") {
@ -1036,7 +1036,7 @@ if (!class_exists('destinations')) {
//build the delete array
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked'] ) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
//build delete array
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];