Handle zones not being set in options

pull/3468/head
Isaac Connor 2022-04-19 12:31:43 -04:00
parent df61f50724
commit 1eaeccc564
1 changed files with 1 additions and 1 deletions

View File

@ -928,7 +928,7 @@ public static function getStatuses() {
$this->Name());
}
if ($options['zones']) {
if (isset($options['zones']) and $options['zones']) {
$html .= '<svg class="zones" id="zones'.$this->Id().'" viewBox="0 0 '.$this->ViewWidth().' '.$this->ViewHeight() .'" preserveAspectRatio="none">'.PHP_EOL;
foreach (Zone::find(array('MonitorId'=>$this->Id()), array('order'=>'Area DESC')) as $zone) {
$html .= $zone->svg_polygon();