Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5365 closed defect (bug) (fixed)

Invalid regex on the WP.org developer theme.

Reported by: xknown's profile xknown Owned by: otto42's profile Otto42
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description

The regex used in wporg-developer/inc/formatting.php:210 is invalid. It generates the following PHP warning.

preg_match(): Compilation failed: invalid range in character class at offset 24

Change History (5)

This ticket was mentioned in PR #18 on WordPress/wordpress.org by xknown.


4 years ago
#1

  • Keywords has-patch added

This fixes a PHP warning.

Fixes https://meta.trac.wordpress.org/ticket/5365

xknown commented on PR #18:


4 years ago
#2

@coffee2code can you please take a look when you have some free time?

#3 @Otto42
4 years ago

  • Owner set to Otto42
  • Resolution set to fixed
  • Status changed from new to closed

In 10145:

Fix a regular expression that newer PHP versions don't like, by escaping the - symbol, to avoid a character class from being seen as a range. Fixes #5365

#4 @coffee2code
4 years ago

  • Component changed from General to Developer Hub

xknown commented on PR #18:


4 years ago
#5

Closing, this has been fixed in 36583ff4c52a391f3b44a634809e398dce3a1eca

Note: See TracTickets for help on using tickets.