Skip to content

Commit

Permalink
Fixed some PHP 8.1 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane authored Aug 29, 2023
1 parent 44f1b6d commit bfdb203
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sms/sms.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
echo "</td>\n";
echo "</tr>\n";

if (is_array($sms_destinations)) {
if (!empty($sms_destinations) && is_array($sms_destinations)) {

foreach($sms_destinations as $row) {
$tr_link = (permission_exists('sms_edit')) ? " href='sms_edit.php?id=".$row['sms_destination_uuid']."'" : null;
Expand Down Expand Up @@ -210,7 +210,7 @@
echo "<br /><br />".((is_array($sms_destinations)) ? "<br /><br />" : null);

// check or uncheck all checkboxes
if (sizeof($ext_ids) > 0) {
if (!empty($ext_ids) && sizeof($ext_ids) > 0) {
echo "<script>\n";
echo " function check(what) {\n";
echo " document.getElementById('chk_all').checked = (what == 'all') ? true : false;\n";
Expand All @@ -221,7 +221,7 @@
echo "</script>\n";
}

if (is_array($sms_destinations)) {
if (!empty($sms_destinations) && is_array($sms_destinations)) {
// check all checkboxes
key_press('ctrl+a', 'down', 'document', null, null, "check('all');", true);

Expand All @@ -231,4 +231,5 @@

//show the footer
require_once "resources/footer.php";

?>

0 comments on commit bfdb203

Please sign in to comment.