Merge pull request #4755 from webaccess/master
[civicrm-core.git] / CRM / Contact / Form / ProfileContact.php
index 8c865da1770960053a20d2945f9e98a022adf642..b2d3e75da06d9a71c08a2fbfc2d197ee0d4c8bb4 100644 (file)
@@ -37,7 +37,9 @@ class CRM_Contact_Form_ProfileContact {
   protected $_mode;
 
   /**
-   * Function to set variables up before form is built
+   * Set variables up before form is built
+   *
+   * @param CRM_Core_Form $form
    *
    * @return void
    * @access public
@@ -73,11 +75,9 @@ class CRM_Contact_Form_ProfileContact {
   }
 
   /**
-   * Function to build form for honoree contact / on behalf of organization.
+   * Build form for honoree contact / on behalf of organization.
    *
-   * @param $form              object  invoking Object
-   * @param $contactType       string  contact type
-   * @param $title             string  fieldset title
+   * @param CRM_Core_Form $form
    *
    * @static
    */
@@ -108,9 +108,12 @@ class CRM_Contact_Form_ProfileContact {
     }
   }
 
+  /**
+   * @param $form
+   */
   static function postProcess($form) {
     $params = $form->_params;
-    if ($form->_honor_block_is_active && !empty($params['soft_credit_type_id'])) {
+    if (!empty($form->_honor_block_is_active) && !empty($params['soft_credit_type_id'])) {
       $honorId = null;
 
       //check if there is any duplicate contact