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

$user->lang() is not handling arguments as per documentation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.8
    • 3.0.9-RC1
    • Sessions
    • None

    Description

      With the $user->lang() you can directly sprintf() into a language string.
      This is useful, when you need different language-strings for different input (1 post, 3 posts, etc.)

      Now the code says:

      		// We now get the first number passed and will select the key based upon this number

      but this is not correct. Currently it uses the last int, as it does not exit the loop of arguments.
      this can be easily fixed by adding a break; after

      				foreach ($numbers as $num)
      				{
      					if ($num > $args[$i])
      					{
      						break;
      					}
       
      					$key_found = $num;
      				}

      Attachments

        Activity

          People

            nickvergessen Joas Schilling [X] (Inactive)
            nickvergessen Joas Schilling [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: