//on some hosts the uploads directory is not automatically created
//on WP auto install so we create it
if (!is_dir(ABSPATH.'wp-content/uploads')) {
mkdir(ABSPATH.'wp-content/uploads');
}
I’m trying to troubleshoot an issue in which some people who install my WP theme get an error (no description) or a blank white screen. I’m thinking that perhaps the code above could be the culprit on certain setups, perhaps depending on support for mkdir?
It could be that
wp-contentis not writable. That should result in a warning at most, though, not a fatal error.mkdircould also be disabled by the provider in a safe mode context, but that should be extremely rare.There’s only one way to find out really: Have people activate
error_reporting()and see what the blog spits out.If I were to shoot in the dark, I would first check whether you use any PHP 5 specific keywords (
privatepublic…..) and clients still use PHP4.