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

Fix places using preg_quote() with hashes in a php 7.3 breaking way

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6, 3.7
    • Fix Version/s: 3.6.4
    • Component/s: General
    • Labels:

      Description

      Looking for uses of preg_quote() in combination with # found a couple of places needing changes in order to continue working the same. Both being "double-conversions" that due the nature of the new preg_quote(), now escaping hashes (#), were not working anymore:

      • backup/util/helper/restore_log_rule.class.php:249
      • mod/lesson/pagetypes/shortanswer.php:106

      This is about to fix those 2 cases, surely replacing both by a preg_quote() safe string like '%@@%@@%'.

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Simey Lameze
              Integrator:
              Adrian Greeve
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 31 minutes
                4h 31m