Closed (fixed)
Project:
Simplenews
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Apr 2012 at 09:39 UTC
Updated:
2 May 2012 at 09:30 UTC
Jump to comment: Most recent file
Discussed this with @corvus_ch already, that function can possibly return the same mail address when called multiple times.
After I thought more about this, it occured to me that this is actually the reason for one of the test hickups, see #1404618: Investigate test hickups. We generate 100 mails there, so that chance for a duplicate is quite high. The result is that we only subscribe 99 different subscribers, leading to only 99 mails and the test fails.
Fix is simple:
Add a static $mails variable, a do/while loop to generate one until we have on that does not exist yet in $mails and then add it and return it.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | simplenews-add_address_chache-1531018-4.patch | 1.59 KB | corvus_ch |
| #2 | simplenews-add_address_chache-1531018-2.patch | 1.6 KB | corvus_ch |
Comments
Comment #1
berdirComment #2
corvus_ch commentedComment #3
berdirThanks!
missing space between ischecked.
Maybe use $mail instead of the generic $result for the variable?
Remember to set the issue status to needs review when uploading a patch.
Comment #4
corvus_ch commentedComment #5
berdirThanks, commited.