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

Missing preg_quote() @ instaclick/php-webdriver leads to PHP 7.3 PCRE2 failures

    XMLWordPrintable

    Details

      Description

      Working on the 3.7 release testing matrix it was detected that a lot of behat tests were failing against FF 47.0.1 (marionette = false) under PHP 7.3. With error:

      Warning: preg_replace(): Compilation failed: number too big in {} quantifier at offset 6
      

      Tracing the problem down, it seems that an apparently innocent preg_replace() is being used to match elements and it's missing any quoting... so the real literals are not being searched. PHP 7.3 warned us, because now (PCRE2) it's pickier... but it may be a problem also for previous versions leading to non-matches depending of the strings being searched.

      So this PR was created: https://github.com/instaclick/php-webdriver/pull/91

      A complete run with the patch applied ended ok (no more PCRE2 failures). Note that some of the failures are the usual Firefox "focus" ones (I ran it locally), and via --rerun they ended passing.

      https://pastebin.com/EVtR3qV4

      This issue is to:

      1) trace that upstream PR (https://github.com/instaclick/php-webdriver/pull/91 )
      2) see if we can incorporate it to our machinery in the mean time, so we get FF 47.0.1 (marionette = false) back to pass.

      Ciao

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/19

                  Time Tracking

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