Mute errors when calling file_exists in search_theme_directories
|Reported by:||goldenapples||Owned by:||nacin|
Just upgraded a production site to 3.4, and I noticed some errors on the admin screens related to the rewrites done in r20020.
The site is maintained by another designer in Dreamweaver, and has the usual _notes/dwsync.xml files strewn around - including, relevantly in the wp-content/themes/ directory.
After upgrading, on every page of the admin, I see the following warning:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/p25lh1ao/public_html/ati/wp-content/themes/_notes/dwsync.xml/style.css) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/p25lh1ao/public_html/ati/wp-includes/theme.php on line 386
I don't mind the error - it gives me a reason to wonder why Dreamweaver is still being used on a site that I've had under version control for a long time. But it seems like there should be some checking going on before searching for a style.css under every file in a directory. I'm not sure which would be faster, to simply mute errors, or check is_dir() on each of the $sub_dirs looped through (which could be either directories, as assumed, or any kind of file.
The attached patch fixed the issue for me.
Change History (5)
- Cc Steibock added
- Version set to 3.4