From 178073d67180bf115c2ccedc4deced427bcbc527 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 3 Apr 2013 13:41:46 -0700 Subject: [PATCH] Code cleanup and php strict fix --- CRM/Event/Form/Registration/Register.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index 9d324ad636..5a4f0336b9 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -341,11 +341,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $contactID = parent::getContactID(); $this->assign('contact_id', $contactID); - $display_name = ''; - if ($contactID) { - $display_name = CRM_Contact_BAO_Contact::displayName($contactID); - } - $this->assign('display_name', $display_name); + $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID)); $config = CRM_Core_Config::singleton(); $this->add('hidden', 'scriptFee', NULL); @@ -1374,7 +1370,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { * @return void * @access public */ - function checkRegistration($fields, &$self, $isAdditional = FALSE, $returnContactId = FALSE, $useDedupeRules = FALSE) { + static function checkRegistration($fields, &$self, $isAdditional = FALSE, $returnContactId = FALSE, $useDedupeRules = FALSE) { // CRM-3907, skip check for preview registrations // CRM-4320 participant need to walk wizard if (!$returnContactId && @@ -1389,10 +1385,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $contactID = parent::getContactID(); } - if (!$contactID && - is_array($fields) && - !empty($fields) - ) { + if (!$contactID && is_array($fields) && $fields) { //CRM-6996 //as we are allowing w/ same email address, -- 2.25.1