From 60c17e1ceab70b0d6b77240095ccc730daa64d7a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 19 Sep 2023 12:26:50 +1200 Subject: [PATCH] Remove getVar call, access protected property in same class directly --- CRM/Campaign/Form/Survey.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CRM/Campaign/Form/Survey.php b/CRM/Campaign/Form/Survey.php index a15aa03dea..e06367831d 100644 --- a/CRM/Campaign/Form/Survey.php +++ b/CRM/Campaign/Form/Survey.php @@ -168,15 +168,13 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { /** * @return string */ - public function getTemplateFileName() { - if ($this->controller->getPrint() || $this->getVar('_surveyId') <= 0) { + public function getTemplateFileName(): string { + if ($this->_surveyId <= 0 || $this->controller->getPrint()) { return parent::getTemplateFileName(); } - else { - // hack lets suppress the form rendering for now - self::$_template->assign('isForm', FALSE); - return 'CRM/Campaign/Form/Survey/Tab.tpl'; - } + // hack lets suppress the form rendering for now + self::$_template->assign('isForm', FALSE); + return 'CRM/Campaign/Form/Survey/Tab.tpl'; } } -- 2.25.1