Opened 13 years ago
Closed 13 years ago
#20985 closed defect (bug) (fixed)
Mute errors when calling file_exists in search_theme_directories
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4.1 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
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_dir
s looped through (which could be either directories, as assumed, or any kind of file.
The attached patch fixed the issue for me.
I confirm this.
To reproduce this bug, it is necessary to have set at least one path as basedir. For me, the warning was only issued when visiting the page used for activating the themes.