• I’m getting this warning:

    Warning: chmod() [function.chmod]: No such file or directory in /home/project/public_html/mysitepath/wordpress/wp-content/plugins/enable-media-replace/upload.php on line 125

    Warning: Cannot modify header information – headers already sent by (output started at /home/project/public_html/mysitepath/wordpress/wp-content/plugins/enable-media-replace/upload.php:125) in /home/project/public_html/mysitepath/wordpress/wp-includes/pluggable.php on line 896

    Any ideas?

    https://wordpress.org/plugins/enable-media-replace/

Viewing 1 replies (of 1 total)
  • Looks like a bug in the code.

    It’s deleting $current_file and then a few lines later it’s trying to chmod the file it deleted.

    115 – 125

    emr_delete_current_files($current_file);
    
    		// Massage new filename to adhere to WordPress standards
    		$new_filename= wp_unique_filename( $current_path, $new_filename );
    
    		// Move new file to old location, new name
    		$new_file = $current_path . "/" . $new_filename;
    		move_uploaded_file($_FILES["userfile"]["tmp_name"], $new_file);
    
    		// Chmod new file to original file permissions
    		chmod($current_file, $original_file_perms);

    I think replacing the following line:

    chmod($current_file, $original_file_perms);

    replace with

    chmod($new_file, $original_file_perms);

    Should hopefully fix it.

Viewing 1 replies (of 1 total)
  • The topic ‘warning message’ is closed to new replies.