Details
- 
    Type:Bug 
- 
    Status: Done/Fixed
- 
    Priority:Minor 
- 
    Resolution: Fixed/Completed
- 
    Affects Version/s: 4.0.1
- 
    Component/s: CiviMember
- 
    Labels:None
Description
A lifetime membership created in the past is given the status of "expired".
I tried figuring this one out, but I can't figure out what exactly is going wrong. It appears that the while loop in CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate() goes through a couple of query results before returning Expired. If you debug it by adding:
print_r($membershipDetails); if($membershipDetails['name'] == 'Expired')
{ die(); }at line 315, you'll see that it prints:
Array
(
    [id] => 2
    [name] => Current
)
Array
(
    [id] => 4
    [name] => Expired
)
Theoretically, the loop should break after the first one, so I don't know what's going wrong.