Make WordPress Core

Changeset 45829


Ignore:
Timestamp:
08/19/2019 03:59:58 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Block Editor: Avoid a PHP warning when a theme adds an editor style with an empty filename.

Props pento, gqevu6bsiz.
Merges [45619] to the 5.2 branch.
Fixes #45739.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/edit-form-blocks.php

    r44938 r45829  
    193193        } else {
    194194            $file = get_theme_file_path( $style );
    195             if ( file_exists( $file ) ) {
     195            if ( is_file( $file ) ) {
    196196                $styles[] = array(
    197197                    'css'     => file_get_contents( $file ),
Note: See TracChangeset for help on using the changeset viewer.