civicrm/civicrm-core — pull request #1555 by davidbarratt (2013-08-30 14:33:56+00:00)
Title: Only throw error when employers are involved.

When a Contact (user) renews a membership that is a related membership (i.e. the primary contact is for instnace, a Household.

The code passes this conditional:

```php
if ($membership->contact_id != $this->_contactID) {
```

However, ti does not pass this conditional:

```php
if (array_key_exists($membership->contact_id, $employers)) {
```

I've added an initial check that checks to see if the employers array is empty or not, if it is empty, it assigns the membership contact id and moves on without error, if it is not empty it follows the normal flow.

Thanks!