[wp-trac] [WordPress Trac] #10889: filesystem's put_content() methods have inconsistent arguments -- causes .maintenance file to not be created
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 2 06:58:55 UTC 2009
#10889: filesystem's put_content() methods have inconsistent arguments -- causes
.maintenance file to not be created
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: dd32
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Filesystem | Version: 2.8.4
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10889>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list