Fix for 1b2df8d
.
This commit is contained in:
parent
1b2df8d4c3
commit
34a9aa8caf
|
@ -32,13 +32,15 @@ class LoadSubscribersData extends AbstractFixture implements OrderedFixtureInter
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($users as $key => $user) {
|
foreach ($users as $key => $user) {
|
||||||
foreach ($subscriptions[$key] as $userId) {
|
if (array_key_exists($key, $subscriptions)) {
|
||||||
$subscriber = $users[$userId];
|
foreach ($subscriptions[$key] as $userId) {
|
||||||
$subscription = new Subscription($user, $subscriber);
|
$subscriber = $users[$userId];
|
||||||
$subscriptionEvent = new SubscriptionEvent($user, $subscriber, SubscriptionEvent::ACTION_SUBSCRIBE);
|
$subscription = new Subscription($user, $subscriber);
|
||||||
$om->persist($subscription);
|
$subscriptionEvent = new SubscriptionEvent($user, $subscriber, SubscriptionEvent::ACTION_SUBSCRIBE);
|
||||||
$om->persist($subscriptionEvent);
|
$om->persist($subscription);
|
||||||
$user->addSubscriber($subscription);
|
$om->persist($subscriptionEvent);
|
||||||
|
$user->addSubscriber($subscription);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue