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

Create new membership type fails with PHP 5.4

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.5, 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: CiviMember
    • Labels:

      Description

      When you try to add a new membership type on a server with PHP 5.4, you get a blank page and an error in the Apache log:

      [Sat Sep 08 03:13:39 2012] [error] [client ::1] PHP Fatal error: Call-time pass-by-reference has been removed in /Library/WebServer/Documents/community/sites/all/modules/civicrm/CRM/Member/Form/MembershipType.php on line 521, referer: http://localhost/community/civicrm/admin/member/membershipType?reset=1

      With PHP 5.3 it worked.

      When I searched for this PHP error I found <http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available>, saying that ”&” mustn’t be used in function calls.

      Then I removed the “&” in function calls in MembershipType.php, and voilà, it worked.

      Jens-Erik Weber

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              maclake Jens-Erik Weber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 minutes
                5m
                Remaining:
                Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified