Voicemail Greetings: Updates for PHP 8.1

This commit is contained in:
fusionate
2023-06-09 16:51:59 +00:00
parent bd9a407ba5
commit 39cb1c3588
5 changed files with 35 additions and 30 deletions
@@ -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-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -92,7 +92,7 @@ if (!class_exists('voicemail_greetings')) {
//filter out unchecked records
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -102,7 +102,7 @@ if (!class_exists('voicemail_greetings')) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, greeting_filename, greeting_id from v_".$this->table." ";
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
$rows = $database->select($sql, $parameters ?? null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$greeting_filenames[$row['uuid']] = $row['greeting_filename'];