Skip to content

Commit

Permalink
Default empty array of markers to avoid an error
Browse files Browse the repository at this point in the history
  • Loading branch information
bricebou committed Apr 26, 2022
1 parent 752b717 commit 49535dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/GISPluginDrawMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function drawMap(array $params)

$page = Grav::instance()['page'];
$header = (array) $page->header();
$this->template_vars['markers'] = $params['markers'] ?? $header['markers'];
$this->template_vars['markers'] = $params['markers'] ?? $header['markers'] ?? [];

$output = Grav::instance()['twig']->twig()->render($this->template_html, $this->template_vars);

Expand Down

0 comments on commit 49535dc

Please sign in to comment.