more cleanup CRM-13233
authorkurund <kurund@civicrm.org>
Fri, 23 Aug 2013 09:56:20 +0000 (15:26 +0530)
committerkurund <kurund@civicrm.org>
Fri, 23 Aug 2013 09:56:20 +0000 (15:26 +0530)
----------------------------------------
* CRM-13233: Payment Method field (payment_processor) should not be required if total fee is $0
  http://issues.civicrm.org/jira/browse/CRM-13233

CRM/Event/Form/Registration/Register.php

index 07237e4322c11980dab5674fd7046568f4871cfe..dfa21b54fef5e1367aca1ddd3fbda77c8fa80e89 100644 (file)
@@ -858,7 +858,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
     }
 
     if ($self->_values['event']['is_monetary']) {
-      if (($fields['amount'] > 0) && (!isset($fields['payment_processor']) && $fields['payment_processor'] != 0 )) {
+      if ($fields['amount'] > 0 && !isset($fields['payment_processor'])) {
         $errors['payment_processor'] = ts('Please select a Payment Method');
       }
       if (is_array($self->_paymentProcessor)) {