Skip to content

Commit

Permalink
Merge pull request #160 from localgovdrupal/feature/guide_pages
Browse files Browse the repository at this point in the history
Initialise guidePages as an array as it is used within array_filter even though it starts of as null
  • Loading branch information
finnlewis authored May 14, 2024
2 parents eefcf87 + d6262da commit 170dcc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Plugin/Block/GuidesAbstractBaseBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
*/
protected function setPages() {
if (is_null($this->guidePages)) {
// Initialise guidePages as an array.
$this->guidePages = [];

if ($this->node->bundle() == 'localgov_guides_overview') {
$this->overview = $this->node;
}
Expand Down

0 comments on commit 170dcc1

Please sign in to comment.