Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10589

user_birthday does not use table alias in $leap_year_birthdays variable definition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.11-RC1
    • 3.0.10
    • Other
    • None

      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)) . "%'";

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

              Created:
              Updated:
              Resolved: