Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29708

$string['storedfilenotcreated'] has extra slashes around {$a->filepath}

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.1.3, 2.2, 2.6.3, 2.7
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Files API, Language
    • Labels:
    • Testing Instructions:
      Hide

      Run the unit tests or just run the core_files_file_storage_testcase unit test:

      $ vendor/bin/phpunit core_files_file_storage_testcase lib/filestorage/tests/file_storage_test.php
      

      This above must be done on all branches.

      Show
      Run the unit tests or just run the core_files_file_storage_testcase unit test: $ vendor/bin/phpunit core_files_file_storage_testcase lib/filestorage/tests/file_storage_test.php This above must be done on all branches.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m28_MDL-29708_Typo_Extra_Slashes

      Description

      During the coding of a local plugin (DAVRoot), I've discovered a really trivial issue:

      $string['storedfilenotcreated'] = 'Can not create file "{$a->contextid}/{$a->component}/{$a->filearea}/{$a->itemid}/{$a->filepath}/{$a->filename}"';
      

      {$a->filepath} starts and ends with "/" so the string should be:

      $string['storedfilenotcreated'] = 'Can not create file "{$a->contextid}/{$a->component}/{$a->filearea}/{$a->itemid}{$a->filepath}{$a->filename}"';
      

      Matteo

        Attachments

          Activity

            People

            Assignee:
            matteo Matteo Scaramuccia
            Reporter:
            matteo Matteo Scaramuccia
            Peer reviewer:
            Dan Poltawski
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Jul/14