[wp-trac] [WordPress Trac] #63743: General: Prevent php warning for not readable files
WordPress Trac
noreply at wordpress.org
Wed Jul 23 14:13:30 UTC 2025
#63743: General: Prevent php warning for not readable files
-------------------------+-----------------------------
Reporter: Ninos Ego | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: minor | Keywords: has-patch
Focuses: |
-------------------------+-----------------------------
Having unreadable php-files in theme-directory triggers following php-
warning:
> file_get_contents(/path/to/theme//maySubdir/file.php): Failed to open
stream: No such file or directory in /wp-includes/class-wp-theme.php#L1333
This PR hardens the `get_post_templates()` function a bit.
Ref:
https://github.com/WordPress/wordpress-develop/pull/9311
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63743>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list