Support » Plugin: WP Attachments » PHP warnings

  • Resolved jbleys

    (@jbleys)


    Hi,

    Thanks for a plugin that provides functionality that I have not been able to find elsewhere.

    As I’m trying out the plugin I experienced some PHP warnings that I want to inform you about. The following warnings happen when un-attaching a file in the media library.

    Warning: Use of undefined constant HTTP_REFERER - assumed 'HTTP_REFERER' (this will throw an Error in a future version of PHP) in /wp-content/plugins/wp-attachments/inc/attach_unattach_reattach.php on line 65
    
    Warning: Cannot modify header information - headers already sent by (output started at/wp-content/plugins/wp-attachments/inc/attach_unattach_reattach.php:65) in /wp-includes/pluggable.php on line 1281
    
    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/wp-attachments/inc/attach_unattach_reattach.php:65) in /wp-includes/pluggable.php on line 1284

    WP version: 5.4
    PHP version: 7.2.23

    Hopefully this helps with future updates.

    Kind regards,
    Jasper Bleijs

Viewing 1 replies (of 1 total)
  • jbleys

    (@jbleys)

    Just an update for others that run into this issue. The warnings can be suppressed by making a change to your wp-config.php file.

    Replace this line from your wp-config.php file:
    define('WP_DEBUG', false);
    with:

    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_DISPLAY', false);
Viewing 1 replies (of 1 total)
  • The topic ‘PHP warnings’ is closed to new replies.