Problem/Motivation
Using the module with a Brevo environment which has a large number of lists results in an endless loop.
Steps to reproduce
Connect the module to a Brevo environment with a large number of lists (the account I'm connecting to has over 200), the available lists don't get rendered, and the Ajax spinner keeps running until you hit a PHP timeout.
Proposed resolution
When fetching lists from Brevo the result is returned in an indexed array containing the keys 0 to 49. Because the module uses += to combine the arrays the results don't get appended but are overridden. In effect this causes the offset to stay at 50 once the array reaches that size, and the module will continue to fetch the same set of lists over and over again from Brevo
Changing the += to an array_merge will properly append the results and fix the issue.
Comments
Comment #2
philalawst commentedSame problem
Solution works !