Fixed New Years Birthday Glitch?

Dodgeboard

Well-known member
Somehow, tons of users are celebrating their birthday today, the moment the date changed to Jan 1 2012. Many of these are not supposed to be celebrating their birthdays today.

It's affecting both the "Today's Birthday" module in the sidebar, and the Notices System.


birthdays.webp




birthday.webp




bday.webp
 
I too have a number of birthdays far higher than usual (12 compared to 2 or 3), but none of them are actually incorrect
 
I went through mine, and some of them are actually born on Jan 1 (according to their profile). But I'm not, and I get the birthday notice on both ID's that I use, but I don't appear on the "Today's Birthday" block.

I've double checked the criteria on the notice, and the only thing that is checked is "Today is User's Birthday" under date criteria, and "User is logged in" under User Criteria.

Very Strange.
 
I may be noticing a trend. Users that have Oct 1 as their birthday in their profile seem to be celebrating their birthday on Jan 1 as well, as it pertains to the birthday notice. Not sure if any other dates are affected, since I cannot log in as other users.

This issue is also affecting my test board.

To duplicate, setup a notice to display to your users on their birthday, then change your birthday to Oct 1st and see if the notice appears.
 
Which level of software are you on?

I reported a birthday bug with the previous release, but it was fixed in 1.1.1.
 
Just confirmed it on my installation so I've added the Confirmed prefix.

I tested various dates but it only seems to be for 1 October.
 
So interestingly, it looks like PHP was doing type conversion here when it shouldn't have necessarily been. It was comparing "13.10" (a string) to "13.1" (also a string) and saying they matched. Numerically they do, but not as strings. I've changed this to a strict check, and it works now. In library/XenForo/Helper/Criteria.php, add the character in red:

Rich (BB code):
if ("$user[dob_day].$user[dob_month]" !== $today)
 
Top Bottom