﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
20985,Mute errors when calling file_exists in search_theme_directories,goldenapples,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_dir`s looped through (which could be either directories, as assumed, or any kind of file.

The attached patch fixed the issue for me.

",defect (bug),closed,normal,3.4.1,Themes,3.4,normal,fixed,,Steibock
