Permalink
Browse files

Use clone of subscription instance.

  • Loading branch information...
1 parent bae4d39 commit 97ce13d647a4f1be29c76b1bf38d48158b7b6ed0 @yhahn yhahn committed Oct 6, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 notifications.list.inc
View
@@ -103,7 +103,7 @@ class Notifications_Subscription_List implements Iterator {
if (!empty($subscription->name)) {
$stored->name = $subscription->name;
}
- $this->subscriptions[$key] = $stored;
+ $this->subscriptions[$key] = clone $stored;
}
}
return $this;

1 comment on commit 97ce13d

Contributor

yhahn commented on 97ce13d Oct 6, 2010

Not sure if this is the right approach but I was seeing just using $stored lead to multiple references to the same instance rather than each instance being separate in the array.

Please sign in to comment.