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

user_birthday does not use table alias in $leap_year_birthdays variable definition

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.10
    • Fix Version/s: 3.0.11-RC1
    • Component/s: Other
    • Labels:
      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

            • Assignee:
              rxu rxu
              Reporter:
              rxu rxu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: