Fixed CRM-14662.

----------------------------------------
* CRM-14662: Fatal error on front-end membership renewal
  https://issues.civicrm.org/jira/browse/CRM-14662