CRM-15480 Fix for Recording completed payment for Pending membership fro...

...m Edit Membership throws fatal error

https://issues.civicrm.org/jira/browse/CRM-15480