Merge pull request #13795 from kewljuice/issue_788
authorEileen McNaughton <eileen@mcnaughty.com>
Mon, 18 Mar 2019 04:59:28 +0000 (17:59 +1300)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2019 04:59:28 +0000 (17:59 +1300)
refs issue 788 fix Warning: A non-numeric value encountered in ...

CRM/Contribute/Form/Contribution/Main.php
CRM/Event/Form/Registration/Register.php

index 8be60178b1cf474db66633c3f7c120941e1d5983..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 da54819b40cec8294af7543d07e051560f135d8b..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');