1. 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?

Discussion in 'Resolved Bug Reports' started by Dodgeboard, Jan 1, 2012.

  1. Dodgeboard

    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.jpg




    birthday.jpg




    bday.jpg
     
    erich37 likes this.
  2. Luke F

    Luke F Well-Known Member

    I too have a number of birthdays far higher than usual (12 compared to 2 or 3), but none of them are actually incorrect
     
  3. Dodgeboard

    Dodgeboard Well-Known Member

    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.
     
  4. Dodgeboard

    Dodgeboard Well-Known Member

    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.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Which level of software are you on?

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

    Dodgeboard Well-Known Member

  7. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
    Dodgeboard likes this.
  8. Dodgeboard

    Dodgeboard Well-Known Member

    so basically the software thinks that:

    01/01/xxxx = 10/01/xxxx (US)
    or; 01/01/xxxx = 01/10/xxxx (for everyone else)
     
  9. Dodgeboard

    Dodgeboard Well-Known Member

    What do you wanna bet that tomorrow, people with Oct 2nd as their birthday will be greeted with a birthday message?
     
    Digital Doctor likes this.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    For the record, that is the case.
     
  11. Mike

    Mike XenForo Developer Staff Member

    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)
     

Share This Page