WordPress.org

Making WordPress.org

Changeset 10145


Ignore:
Timestamp:
08/11/2020 09:12:44 PM (16 months ago)
Author:
Otto42
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

    r10068 r10145  
    208208
    209209        // Link to hook: {@see 'pre_get_search_form'}
    210         elseif ( 1 === preg_match( '/^(?:\'|(?:‘))([\$\w-&;]+)(?:\'|(?:’))$/', $link, $hook ) ) {
     210        elseif ( 1 === preg_match( '/^(?:\'|(?:‘))([\$\w\-&;]+)(?:\'|(?:’))$/', $link, $hook ) ) {
    211211            if ( ! empty( $hook[1] ) ) {
    212212                $url = get_post_type_archive_link( 'wp-parser-hook' ) .
Note: See TracChangeset for help on using the changeset viewer.