[wp-trac] [WordPress Trac] #8830: wp_mkdir_p doesn't work with safe
mode enabled
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 9 15:40:03 GMT 2009
#8830: wp_mkdir_p doesn't work with safe mode enabled
--------------------------+-------------------------------------------------
Reporter: remi | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: General | Version: 2.7
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
The `wp_mkdir_p` function (which is used by many WP features like media
uploading) doesn't work when PHP's safe-mode is enabled because it allows
trailing slashes at the end of the directories it tries to create.
Adding this code at the beginning of the function solves the problem:
{{{
if (substr($target, -1) == "/") {
$target = substr($target, 0, -1);
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/8830>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list