From d0481896ba7176c71a85b097cdfc70cf3b6ef400 Mon Sep 17 00:00:00 2001 From: fusionate Date: Mon, 22 May 2023 23:05:44 +0000 Subject: [PATCH] Destinations [Class]: Updates for PHP 8.1 --- app/destinations/resources/classes/destinations.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index f9b951b88e..29c158a1d7 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -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'];