I am importing an entity reference by label. If entity reference doesn't find a match, it throws an error:

Warning: array_keys() expects parameter 1 to be array, boolean given in entityreference_feeds_set_target() (line 131 of /sites/all/modules/contrib/entityreference/entityreference.feeds.inc).
Warning: reset() expects parameter 1 to be array, null given in entityreference_feeds_set_target() (line 133 of /sites/all/modules/contrib/entityreference/entityreference.feeds.inc).

In the feeds.inc we have:

        case 'label':
          $options = $handler->getReferencableEntities($value, '=');
          $options = reset($options);
          $etids = array_keys($options);
          // Use the first matching entity.
          $entity_id = reset($etids);
          break;

If $options doesn't return a result, the array_keys() line causes an error.

Files: 
CommentFileSizeAuthor
#1 no-label-ref-found-1943300-1.patch798 bytesRob_Feature

Comments

StatusFileSize
new798 bytes

This patch is almost certainly not correct, but it fixes it until a better dev comes up with a solution.