Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10589

user_birthday does not use table alias in $leap_year_birthdays variable definition

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.10
    • 3.0.11-RC1
    • Other
    • None

    Description

      See index.php around line 92:

      	if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
      	{
      		$leap_year_birthdays = " OR user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
      	}

      Since following SQL query uses 'u' as USERS_TABLE alias, that expression should be adjusted accordingly, otherwise it will bring error on index page when 'if' condition is true. Should be:

      $leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";

      Attachments

        Activity

          People

            rxu rxu
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: