Skip to content

Commit

Permalink
More defensive coding
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 3, 2014
1 parent c6f8e5c commit c341109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Marshaller.php
Expand Up @@ -355,7 +355,7 @@ protected function _mergeBelongsToMany($original, $assoc, $data, $include) {
$extra = [];
foreach ($original as $entity) {
$joinData = $entity->get('_joinData');
if ($joinData) {
if ($joinData && $joinData instanceof EntityInterface) {
$extra[spl_object_hash($entity)] = $joinData;
}
}
Expand Down

0 comments on commit c341109

Please sign in to comment.