Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-7424

Failed opening required 'CRM/Core/.php' when viewing membership tab w/disabled payment processor

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.alpha
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Create a payment processor and a contribution page that enables the membership section. Sign up as a member, disable the payment processor and try to view your membership tab.

      The error occurs because line 103 in CRM/Core/Payment.php doesn't check to see if the class file actually exists before trying to load it. The &$paymentProcessor passed into the singleton function is null. So maybe a simple check to see if it's null?

      The recommended fix would be to ignore whether or not the payment processor is disabled when viewing the membership tab. Not sure exactly where that exists. Based on the stack trace, the best place to check for null seems to in PaymentProcessor.php. Below is the patch but it's unclear what implications this has elsewhere.

      — PaymentProcessor.php.orig 2011-01-22 21:37:59.000000000 -0700
      +++ PaymentProcessor.php 2011-01-22 21:37:43.000000000 -0700
      @@ -248,6 +248,7 @@ INNER JOIN civicrm_contribution co
      return CRM_Core_BAO_PaymentProcessor::getPayment( $ppID, $mode );
      } else if ( $type == 'obj' ) {
      $payment = CRM_Core_BAO_PaymentProcessor::getPayment( $ppID, $mode );
      + if (empty($payment))

      { return null; }

      return CRM_Core_Payment::singleton( $mode, $payment );
      }
      return null;

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dharmatech Dharmatech
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: