fix error when no monitors defined and we are adding one.Fixes #3385
This commit is contained in:
parent
1f75b017cc
commit
46a835b28a
|
@ -453,7 +453,7 @@ foreach ( $tabs as $name=>$value ) {
|
||||||
switch ( $name ) {
|
switch ( $name ) {
|
||||||
case 'general' :
|
case 'general' :
|
||||||
{
|
{
|
||||||
if (!$monitor->Id()) {
|
if (!$monitor->Id() and count($monitors)) {
|
||||||
$monitor_ids = array();
|
$monitor_ids = array();
|
||||||
foreach ($monitors as $m) { $monitor_ids[] = $m['Id']; }
|
foreach ($monitors as $m) { $monitor_ids[] = $m['Id']; }
|
||||||
$available_monitor_ids = array_diff(range(min($monitor_ids),max($monitor_ids)), $monitor_ids);
|
$available_monitor_ids = array_diff(range(min($monitor_ids),max($monitor_ids)), $monitor_ids);
|
||||||
|
@ -470,7 +470,7 @@ if (count($available_monitor_ids)) {
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
} # end if ! $monitor->Id()
|
} # end if ! $monitor->Id() and count($monitors)
|
||||||
?>
|
?>
|
||||||
<tr class="Name">
|
<tr class="Name">
|
||||||
<td class="text-right pr-3"><?php echo translate('Name') ?></td>
|
<td class="text-right pr-3"><?php echo translate('Name') ?></td>
|
||||||
|
|
Loading…
Reference in New Issue