Make WordPress Core


Ignore:
Timestamp:
01/14/2010 09:23:53 AM (16 years ago)
Author:
dd32
Message:

Standardise WP_Filesystem_*::put_contents() arguments to support chmod reliably across all transports. Fixes #10889

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-direct.php

    r11934 r12723  
    5555     * Write a string to a file
    5656     *
    57      * @param $file string Path to the file where to write the data.
     57     * @param $file string Remote path to the file where to write the data.
    5858     * @param $contents string The data to write.
    5959     * @param $mode int (optional) The file permissions as octal number, usually 0644.
    60      * @param $type string (optional) Specifies additional type of access you require to the file.
    6160     * @return bool False upon failure.
    6261     */
    63     function put_contents($file, $contents, $mode = false, $type = '') {
    64         if ( ! ($fp = @fopen($file, 'w' . $type)) )
     62    function put_contents($file, $contents, $mode = false ) {
     63        if ( ! ($fp = @fopen($file, 'w')) )
    6564            return false;
    6665        @fwrite($fp, $contents);
Note: See TracChangeset for help on using the changeset viewer.