WordPress.org

Make WordPress Core

Ticket #13965: ensure_headers_array.13965.diff

File ensure_headers_array.13965.diff, 658 bytes (added by filosofo, 8 years ago)
  • wp-includes/functions.php

     
    16331633        );
    16341634
    16351635        if ( function_exists('apply_filters') ) {
    1636                 $headers = apply_filters('nocache_headers', $headers);
     1636                $headers = (array) apply_filters('nocache_headers', $headers);
    16371637        }
    16381638        return $headers;
    16391639}
     
    16491649 */
    16501650function nocache_headers() {
    16511651        $headers = wp_get_nocache_headers();
    1652         foreach( (array) $headers as $name => $field_value )
     1652        foreach( $headers as $name => $field_value )
    16531653                @header("{$name}: {$field_value}");
    16541654}
    16551655