Skip to content

Commit

Permalink
Fix passing updating the header through event, no need for return value
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Sep 15, 2016
1 parent 7a952a9 commit b79c0d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public function onPageProcessed(Event $e)
$header = $page->header();

//call event to allow filling the page header form dynamically (e.g. use case: Comments plugin)
$event = $this->grav->fireEvent('onFormPageHeaderProcessed', new Event(['header' => $header]));
$header = $event->header;
$this->grav->fireEvent('onFormPageHeaderProcessed', new Event(['header' => $header]));

if ((isset($header->forms) && is_array($header->forms)) ||
(isset($header->form) && is_array($header->form))) {
Expand Down

0 comments on commit b79c0d7

Please sign in to comment.