diff --git a/Cake/ORM/Association/BelongsToMany.php b/Cake/ORM/Association/BelongsToMany.php index ee247f502f5..83cf8771be3 100644 --- a/Cake/ORM/Association/BelongsToMany.php +++ b/Cake/ORM/Association/BelongsToMany.php @@ -699,7 +699,7 @@ protected function _collectJointEntities($sourceEntity, $targetEntities) { $assocForeignKey = (array)$belongsTo->foreignKey(); $sourceKey = $sourceEntity->extract((array)$source->primaryKey()); - foreach($missing as $key) { + foreach ($missing as $key) { $unions[] = $junction->find('all') ->where(array_combine($foreignKey, $sourceKey)) ->andWhere(array_combine($assocForeignKey, $key))