Devices a few more PHP 8.1 changes

This commit is contained in:
markjcrane 2023-05-26 09:24:02 -06:00
parent 55e506ff99
commit ad6ed407d7
1 changed files with 2 additions and 2 deletions

View File

@ -298,7 +298,7 @@
echo button::create(['type'=>'button','label'=>$text['button-profiles'],'icon'=>'clone','link'=>'device_profiles.php']);
}
$margin_left = permission_exists('device_import') || permission_exists('device_export') || permission_exists('device_vendor_view') || permission_exists('device_profile_view') ? "margin-left: 15px;" : null;
if (permission_exists('device_add') && (!is_numeric($_SESSION['limit']['devices']['numeric']) || ($total_devices < $_SESSION['limit']['devices']['numeric']))) {
if (permission_exists('device_add') && (empty($_SESSION['limit']['devices']['numeric']) || ($total_devices < $_SESSION['limit']['devices']['numeric']))) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','style'=>$margin_left,'link'=>'device_edit.php']);
unset($margin_left);
}
@ -381,7 +381,7 @@
}
echo "</tr>\n";
if (is_array($devices) && @sizeof($devices) != 0) {
if (!empty($devices) && @sizeof($devices) != 0) {
$x = 0;
foreach($devices as $row) {