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

preg_replace /e removed from PHP7

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: Libraries
    • Labels:
      None

      Description

      As reported by php7cc:

      File: /home/davidm/Desktop/moodlecode/int/master/lib/typo3/class.t3lib_div.php
      > Line 5380: Removed regular expression modifier "e" used
          preg_replace('/(http|https):\\/\\/.+(?=[\\]\\.\\?]*([\\! \'"()<>]+|$))/eiU', 'self::makeRedirectUrl("\\0",' . $lengthLimit . ',"' . $index_script_url . '")', $message);
      

      File: /home/davidm/Desktop/moodlecode/int/master/lib/editor/tinymce/plugins/spellchecker/classes/GoogleSpell.php
      > Line 132: Removed regular expression modifier "e" used
          preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
      > Line 133: Removed regular expression modifier "e" used
          preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
      

      File: /home/davidm/Desktop/moodlecode/int/master/lib/adodb/drivers/adodb-db2ora.inc.php
      > Line 41: Removed regular expression modifier "e" used
          preg_replace('/(:[0-9]+)/e', '_colontrack(\'\\1\')', $sql);
      

      Just commented about this in https://tracker.moodle.org/browse/MDL-52286?focusedCommentId=385941&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-385941

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dmonllao David Monllaó
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: