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

preg_replace_callback range out of order in mod/url /locallib in PHP 5.2.x

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.0.7
    • Component/s: Resource
    • Labels:
    • Testing Instructions:
      Hide

      1/ find server with php 5.2.x
      2/ try adding new url module instance

      Show
      1/ find server with php 5.2.x 2/ try adding new url module instance
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:

      Description

      After upgrade to Moodle 2.0.6, mod/url des not opens up anymore the original location. With debugging, the following message is displayed:

      Warning: preg_replace_callback() [function.preg-replace-callback]: Compilation failed: range out of order in character class at offset 39 in /your/path/to/moodle/mod/url/locallib.php on line 95

      To reproduce:

      • on a 2.0.6 site, with Multimedia and Glossary filter on, turn debugging on
      • add an URL resource pointing to an external link.
      • configure the resource "view" option to "open" or "popup"
      • click "save and view". The Warning in displayed, the url is not open in the popup, and the link is not printed when resource "view" option is set to "open"

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/12