WordPress.org

Make WordPress Core

Ticket #33387: 33387.2.diff

File 33387.2.diff, 690 bytes (added by Thomas Vitale, 22 months ago)

Patch refreshed

  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 53a2204376..0bd0e07eb8 100644
    a b function get_file_data( $file, $default_headers, $context = '' ) { 
    51075107        }
    51085108
    51095109        foreach ( $all_headers as $field => $regex ) {
    5110                 if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] ) {
     5110                if ( preg_match( '/^(?:[ \t]*<\?php)?[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] ) {
    51115111                        $all_headers[ $field ] = _cleanup_header_comment( $match[1] );
    51125112                } else {
    51135113                        $all_headers[ $field ] = '';