11
zyspec
Re: The same notification is sent at a rate of 2 minutes.
  • 2009/11/11 15:21

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


There appears to be a couple of problems with this code snippet - although I can't be sure since I don't have the contents of the entire file...

1) $messagesent is only defined in one of the failure cases, not all. It also isn't defined for success (although I suspect that it's probably somewhere else in the file 'above' this code snippet).

2) I don't think the $users array contains what the author 'thought' it would when no users meet the criteria. In this case $users contains ( 0=> 0), not (0=> '999999999'). I believe the intent was that the $users array should contain ('999999999'=>0) so that an invalid user is attempted to be notified. This is an 'ugly hack' that really should be reworked since this assumes that the notification code will error check this correctly and fail gracefully. In this case no error message is generated so whatever was in $messagesent will be displayed (I'm assuming this is a 'success' message) which I'm assuming is incorrect.

I also assume the reason your user is getting 2 messages is because they've indicated they want a notification on 2 of the 3 notification events that are generated by this code (global, category, or ad approval)

None of this explains the '1 minute' interval. I suspect that you need to check the notification code to see what happens when you pass it a large array of users to see if it attempts to split the notifications into smaller 'chunks'. It could be your user is on the boundary of the split and the notification code isn't calculating it correctly.

Hope this helps

Login

Who's Online

516 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 516


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits