refs issue 788 removed extra & sign, added int casting.
authorwouter.hechtermans <wouter.hechtermans@calibrate.be>
Fri, 8 Mar 2019 17:17:37 +0000 (18:17 +0100)
committerwouter.hechtermans <wouter.hechtermans@calibrate.be>
Fri, 8 Mar 2019 17:17:37 +0000 (18:17 +0100)
CRM/Contribute/Form/Contribution/Main.php
CRM/Event/Form/Registration/Register.php

index 89de770a1a455cbdff95d70f1e7a1c555433f8aa..0115fab9a93a483866411daf78edc3d1ce3389a7 100644 (file)
@@ -897,7 +897,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
     // return if this is express mode
     $config = CRM_Core_Config::singleton();
     if ($self->_paymentProcessor &&
-      $self->_paymentProcessor['billing_mode'] && CRM_Core_Payment::BILLING_MODE_BUTTON
+      (int) $self->_paymentProcessor['billing_mode'] & CRM_Core_Payment::BILLING_MODE_BUTTON
     ) {
       if (!empty($fields[$self->_expressButtonName . '_x']) || !empty($fields[$self->_expressButtonName . '_y']) ||
         CRM_Utils_Array::value($self->_expressButtonName, $fields)
index ef96be1ebefab749c1a2f3672f3799a2f66c29a6..1cc5f83235c27e88d9bee089c3fb9156e1283346 100644 (file)
@@ -1147,7 +1147,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
         $this->handlePreApproval($params);
       }
       elseif ($this->_paymentProcessor &&
-        $this->_paymentProcessor['billing_mode'] && CRM_Core_Payment::BILLING_MODE_NOTIFY
+        (int) $this->_paymentProcessor['billing_mode'] & CRM_Core_Payment::BILLING_MODE_NOTIFY
       ) {
         // The concept of contributeMode is deprecated - but still needs removal from the message templates.
         $this->set('contributeMode', 'notify');