WordPress.org

Ready to get started?Download WordPress

Forums

Deprecated: Assigning the return value of new by reference is deprecated in (20 posts)

  1. polle001
    Member
    Posted 2 years ago #

    I am getting this error in Dashboard, RSS Widgets, etc...

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 739

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1109

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1603

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1644

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1664

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1694

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1764

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1975

    Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/site.com/httpdocs/wp-includes/class-simplepie.php on line 1979

    How can I fix it ?

    Thanks.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress.

  3. polle001
    Member
    Posted 2 years ago #

    The conflict is there and not with other themes and plugins that are tested to work fine and compatible with 5.3.x.

    So why is WordPress using deprecated php features ?
    How can I fix it in the mean time ?

    if I cant use plugins or scripts that are up to date because WP uses deprecated php features makes no sense. I want to have everything working as it should.

    Thanks.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    WordPress core is not using deprecated PHP features.

  5. Does your wp-config.php contain one or both of these lines?

    define('WP_DEBUG', true);
    define('SCRIPT_DEBUG', true);

    http://codex.wordpress.org/Editing_wp-config.php#Debug

    If yes for either one, make a backup copy of wp-config.php and remove those lines using a plain text editor.

    If you make a mistake restore your wp-config.php backup copy.

    Edit: DOH! Late again! Esmi's correct and more on point.

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    @Jan: I run my dev installs with all debug options active and I've never seen these notices before.

  7. Yep, see my above edit. ;)

  8. polle001
    Member
    Posted 2 years ago #

    Jan, I just have this:

    define('WP_DEBUG', false);

    esmi, thats strange, because if you (as a moderator) search for this in the forums, you will find hundreds of threads talking about the same thing. So I am not making this up, it happens.

    If the message appears its because WP is using deprecated php features, not because a plugin that actually uses up to date code, makes conflicts. ¿Makes sense?

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    Did you try any of the steps I suggested above?

  10. polle001
    Member
    Posted 2 years ago #

    Yes. Having a new blank wordpress install without anything works fine. Adding up to date plugins breaks it.

    Of course I don't want a clean install with nothing, I want to be able to add stuff (again, up to date) and have everything working.

    That error is telling something, you don't have to believe me, believe technology, in this case believe PHP, its the one telling what is happening here.

    There are some threads telling to replace "=& new" with "= new" in that file, for some works, for some not. Other threads said something else, other ones suggest to modify ini files, etc...

    What I am looking for is what does WP itself recommends for squashing a problem happening in the main files it offers.

    Thanks.

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Yes. Having a new blank wordpress install without anything works fine. Adding up to date plugins breaks it.

    Then it's not a core issue. It's a plugin issue.

  12. polle001
    Member
    Posted 2 years ago #

    In php 5.3
 =& new is deprecated, so its a core issue. Stop trying to say its not like that, the error shows whats going on there.

    What I need is a fix for that.

    Thanks.

  13. esmi
    Forum Moderator
    Posted 2 years ago #

    Having a new blank wordpress install without anything works fine.

    This is not a core issue.

  14. polle001
    Member
    Posted 2 years ago #

    Really ?

    In php 5.3
 "=& new" is deprecated and that comes in that file. Just the file, leave all wordpress files and themes, just that simple file has deprecated php features. So it does not matter if installing it with nothing else works.

    Maybe you are telling here that every developer in the world should use deprecated php features so the conflicts go away, right ?

    First you say you have never seen this errors. Having the forum full of threads talking about it I don't know where have you been moderating.

    Then you said that WordPress core is not using deprecated PHP features, when it clearly does.

    An now you said that because it installs fine, everything else is broken.

    WOW.

  15. esmi
    Forum Moderator
    Posted 2 years ago #

    Having a new blank wordpress install without anything works fine.

    This is not a core issue.

  16. polle001
    Member
    Posted 2 years ago #

    This is not a core issue.

    WOW.

  17. Daniel
    Member
    Posted 1 year ago #

    Step 1. Download a fresh copy of wordpress
    Step 2. View file /wordpress/wp-includes/class-simplepie.php
    Step 3. Scroll to line 739
    Observe that it looks like:
    $this->sanitize =& new SimplePie_Sanitize;

    Note the deprecated syntax. WordPress is shipping code that uses deprecated code. This is not a plugin issue. Unless we expect plugins to update wordpress core files. It does not show up in your dev enviroment for any number of reasons.

  18. espritlibre
    Member
    Posted 1 year ago #

    Any update?

  19. espritlibre
    Member
    Posted 1 year ago #

    It seems to be already fixed in Simplepie.
    https://github.com/simplepie/simplepie/issues/75

    Why is WordPress shipping outdated SimplePie's code?

    SimplePie v 1.2.1 is out of date.

    Regards.
    Giovanni

  20. espritlibre
    Member
    Posted 1 year ago #

    Mmm.
    It seems they're already working on it.
    http://core.trac.wordpress.org/changeset/21644

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.