﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
10889,filesystem's put_content() methods have inconsistent arguments -- causes .maintenance file to not be created,Denis-de-Bernardy,dd32,"I ran into this odd bug in my theme's custom.css editor -- the file wasn't being created. Un-silencing the FTP transport's call to ftp_fput() revealed:

{{{
Warning: ftp_fput() [function.ftp-fput]: Mode must be FTP_ASCII or FTP_BINARY in /path/to/public_html/wp-admin/includes/class-wp-filesystem-ftpext.php on line 125
}}}

Basically, I had mindlessly used the same signature as other places where it's used in WP, i.e.:

{{{
$wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE);
$wp_filesystem->put_contents($file, $maintenance_string, FS_CHMOD_FILE);
}}}

but with the FTP transport and others, those two should actually read as:

{{{
$wp_filesystem->put_contents($file, $maintenance_string);
}}}

else, the .maintenance files are not created at all.",defect (bug),closed,normal,3.0,Filesystem,2.8.4,normal,fixed,has-patch bug-hunt,
