• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed New Years Birthday Glitch?

Dodgeboard

Well-known member
#1
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.jpg




birthday.jpg




bday.jpg
 

Luke F

Well-known member
#2
I too have a number of birthdays far higher than usual (12 compared to 2 or 3), but none of them are actually incorrect
 

Dodgeboard

Well-known member
#3
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.
 

Dodgeboard

Well-known member
#4
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.
 

Brogan

XenForo moderator
Staff member
#5
Which level of software are you on?

I reported a birthday bug with the previous release, but it was fixed in 1.1.1.
 

Brogan

XenForo moderator
Staff member
#7
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.
 

Mike

XenForo developer
Staff member
#11
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:

Code:
if ("$user[dob_day].$user[dob_month]" !== $today)