Deprecated: Assigning the return value of new by reference -path- scheduled-content.php on line 449

Deprecated: Assigning the return value of new by reference is deprecated in /wp-content/plugins/scheduled-content/scheduled-content.php on line 449

$sc = &new ScheduledContent();

The above message started yesterday, after updating other plugins! Among a few other massages.

How can I solve this myself in the future?

  • aristath
    • Recruit

    Hello there @wouter Jan Kok, I hope you’re well today!

    This is a simple PHP warning, nothing to worry about.

    These warnings are usually displayed to developers for debugging purposes and should be hidden in a production server.

    The particular message is caused by the fact that we have to remain a bit compatible with older versions of WordPress and PHP, nothing more than that.

    Please make sure that WP_DEBUG is set to false in your wp-config.php file.

    If that doesn’t work, add the following right below the WP_DEBUG line in your wp-config.php file:

    display_errors = Off
    display_startup_errors = Off
    log_errors = On
    ignore_repeated_errors = On
    ignore_repeated_source = Off
    html_errors = Off

    I hope that helps!

    Cheers,

    Ari.

  • Adam Czajczyk
    • Support Gorilla

    Hello!

    This thread inactive for a long time but since it’s still available through search, let me please update it. In case adding

    define(“WP_DEBUG”, false);

    line to “wp-config.php” file didn’t help, the other lines suggested by Aristath should be added this way:

    – create an empty file named “php.ini”

    – put this content inside

    display_errors = Off
    display_startup_errors = Off
    log_errors = On
    ignore_repeated_errors = On
    ignore_repeated_source = Off
    html_errors = Off

    – save file and upload it to root folder of you WP install (root domain folder).

    Best regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.