Changes between Initial Version and Version 3 of Ticket #56664
- Timestamp:
- 09/27/2022 06:06:09 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #56664
- Property Keywords has-patch reporter-feedback added
-
Ticket #56664 – Description
initial v3 1 1 There's a small error in the `register_block_style_handle()` function which prevents us from properly determining if a stylesheet for a block exists or now. 2 2 We use `$style_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $style_path ) );` to get the stylesheet's path, and then we check if the file exists by doing `$has_style_file = false !== $style_path_norm;`. 3 The problem is that `realpath()` returns`false` if the file does not exist, however it then passes through `wp_normalize_path()` and the `false` value gets converted to an empty string. 3 4 The problem is that `realpath()` returns`false` if the file does not exist, however it then passes through `wp_normalize_path()` and the `false` value gets converted to an empty string - therefore making the `false !== $style_path_norm` condition to fail.