From e3a6ed7b91a2d97f4a3703bd233ae851fd9c5b3a Mon Sep 17 00:00:00 2001 From: Andy Footner Date: Wed, 9 Oct 2024 18:27:33 +0200 Subject: [PATCH] chore: correct order of checks Refs: sitreps --- .../custom/rwr_sitrep/src/Controller/PdfController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/modules/custom/rwr_sitrep/src/Controller/PdfController.php b/html/modules/custom/rwr_sitrep/src/Controller/PdfController.php index fe1720f8..aa9de22f 100644 --- a/html/modules/custom/rwr_sitrep/src/Controller/PdfController.php +++ b/html/modules/custom/rwr_sitrep/src/Controller/PdfController.php @@ -74,10 +74,10 @@ public function isPdfable(Node $node) { $group_content_array = GroupRelationship::loadByEntity($node); $group_content = reset($group_content_array); - if ($group_content->getGroupType()->id() != 'cluster') { - return FALSE; - } if ($group_content) { + if ($group_content->getGroupType()->id() != 'cluster') { + return FALSE; + } $group = $group_content->getGroup(); if ($group->get('field_cluster_subtype')->first()) {