WordPress.org

Make WordPress Core

Ticket #19854: 19854.3.diff

File 19854.3.diff, 551 bytes (added by solarissmoke, 2 years ago)

nacin's fix

  • wp-includes/functions.php

     
    34303430                $all_headers = $default_headers; 
    34313431        } 
    34323432 
     3433        $file_data = str_replace( array( "\r\n", "\r" ), "\n", $file_data );    // Line endings can be just \r on Mac 
     3434         
    34333435        foreach ( $all_headers as $field => $regex ) { 
    34343436                preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field}); 
    34353437                if ( !empty( ${$field} ) )