WordPress.org

Make WordPress Core

Ticket #6735: upload_php_ini_error.patch

File upload_php_ini_error.patch, 1000 bytes (added by simonwheatley, 6 years ago)

Amends upload filesize error to mention all relevant php.ini values

  • wp-includes/script-loader.php

    old new  
    9191                // these error messages came from the sample swfupload js, they might need changing. 
    9292                $this->localize( 'swfupload-handlers', 'swfuploadL10n', array( 
    9393                                'queue_limit_exceeded' => __('You have attempted to queue too many files.'), 
    94                                 'file_exceeds_size_limit' => sprintf(__('This file is too big. Your php.ini upload_max_filesize is %s.'), ini_get('upload_max_filesize')), 
     94                                'file_exceeds_size_limit' => sprintf(__('This file is too big. In your php.ini, upload_max_filesize is %1$s and post_max_size is %2$s.'), ini_get('upload_max_filesize'), ini_get('post_max_size')), 
    9595                                'zero_byte_file' => __('This file is empty. Please try another.'), 
    9696                                'invalid_filetype' => __('This file type is not allowed. Please try another.'), 
    9797                                'default_error' => __('An error occurred in the upload. Please try again later.'),