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

lang.php: trying to include a non existing file

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Language
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      on line 426 of admin/lang.php there is a small "bug": if the local file does not exist there is an error report...
      I suggest to modify the block in lines 425-437 with

      $packstring = array();
      $saveinto = $langdir;
      if ($uselocal) {
      if(file_exists($trfilepath)) {
      include($trfilepath);
      if (isset($string))

      { $packstring = $string; }

      unset($string);
      }
      $saveinto = $locallangdir;
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08