WordPress.org

Forums

Fixing Deprecated: Assigning the return value of new by reference is deprecated (24 posts)

  1. Sawtooth500
    Member
    Posted 3 years ago #

    We're running PHP 5.3.8 - need to run this because of new features in PHP

    WP 3.2.1

    We're getting Deprecated: Assigning the return value of new by reference is deprecated in errors all over the admin. We have a very large blog. This is significantly slowing down the server....

    I need a fix to this deprecated problem. Sounds like a core wordpress problem. Not turn off error reporting, but a fix because having thousands of these deprecated errors really adds up.

    Does anyone have a timeframe for when this will be solved, or an easy solution?

  2. Whats the full and complete error?

    If it's caused by a plugin or theme, you'll need to turn that OFF to resolve the issue, but it's probably not core, or everyone on PHP 5.3.8 would have reported this.

  3. Sawtooth500
    Member
    Posted 3 years ago #

    Turned off all plugins. Theme is twenty eleven. When I log into admin under Dashboard incoming links I have the following, and there are a LOT more than listed here. Also have similar errors under WordPress Blog and Plugins on the dashboard.

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 738

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1108

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1602

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1643

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1663

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1693

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1763

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1974

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 1978

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 2377

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 2392

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 2396

    Deprecated: Assigning the return value of new by reference is deprecated in /home/nfcsocia/public_html/wp-includes/class-simplepie.php on line 2400

  4. Nanang Rukmana
    Member
    Posted 3 years ago #

    there are no problems with my wp on PHP 5.3.8

  5. When I log into admin under Dashboard incoming links I have the following

    Do you have debugging turned on in your wp-config.php file?

  6. Terence
    Member
    Posted 3 years ago #

    I don't know where it came from - same thing hit me out of the blue. I have it too now on WP 3.3.1 and PHP 5.3. I just deactivated ALL plugins but its still there. wp-config.php set to define('WP_DEBUG', false);

  7. The8thLegion
    Member
    Posted 3 years ago #

    I'm also getting the same annoying error.

  8. SooBahkDo
    Member
    Posted 3 years ago #

    Hello,

    We too are running WP 3.3.1 and PHP 5.3.8 and are encountering an endless stream of these errors.

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14904

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14418

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14368

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14294

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14269

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14197

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14133

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 14087

    23-Mar-2012 15:33:14 PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/oursitename/public_html/wp-includes/class-simplepie.php on line 13052

    and on and on

    Phil D

  9. wpsecuritylock
    Member
    Posted 3 years ago #

    Have the same issue after MediaTemple (grid-service) upgraded to 5.3.10.

    Showing multiple errors (100+) from the WordPress 3.3.2 dashboard under Incoming Links, WordPress Blog, Plugins, etc. Example:
    Deprecated: Assigning the return value of new by reference is deprecated in zzz/public_html/wp-includes/class-simplepie.php on line 1763

    Site Stats:
    WordPress 3.3.2
    Active Plugins:
    DigitalAccessPass LiveLinks 1.8.1
    Exclude Pages from Navigation 1.92
    Google Doc Embedder 2.4.2
    S3 Media Vault 0.2
    Inactive Plugins:
    Akismet 2.5.6
    Hello Dolly 1.6
    Active Theme: OptimizePress 1.5

    I have tried the following methods and the same errors show up:

    1. Deactivated all plugins
    2. Renamed plugins folder
    3. Activated Twentyten and then tried TwentyEleven
    4. Added the following code to php.ini:
    error_reporting = E_ALL & ~E_NOTICE
    display_errors = Off
    5. Added the following code to wp-config.php:
    error_reporting(0);

    Media Temple upgrade info:
    http://kb.mediatemple.net/questions/245/FAQs+on+PHP+EOL#gs

    I found this article with the exact same issue with PHP 5.3.10:
    http://stackoverflow.com/questions/10722381/php-deprecated-errors-wont-disappear-on-wordpress-dashboard/10740845#10740845

    I have exhausted all methods. It must be something to do with WordPress and PHP 5.3.10. Any other suggestions would be appreciated.

  10. wpsecuritylock
    Member
    Posted 3 years ago #

    I have contacted MediaTemple several times and this issue has not been resolved. Here is their latest reply:

    While updating to PHP 5.3 should not affect most websites, it appears your website may not be compatible with current versions of PHP. (mt) Media Temple currently only supports PHP 5.3 on the (gs) Grid-Service and (dv) Dedicated-Virtual Server.

    All versions of PHP prior to 5.3 were removed from our services because they are no longer supported by PHP and will not received any future updates or security fixes.

    We understand the process to become compliant with PHP 5.3 may not be easy for you; however, it is required if you would like to host the affected websites with (mt) Media Temple on a (gs) Grid-Service or (dv) Dedicated-Virtual Server.

    You may need to manually edit your code or move to a (ve) Server. If you are not able to do this yourself, you may want to consult a web developer who can make these changes for you.

    Are they trying to tell me that WordPress does not work with PHP 5.3? Any suggestions would be appreciated.

  11. Sawtooth500
    Member
    Posted 3 years ago #

    Just dump media temple. I use hostgator personally. I really hate media template - their support department is horrible.

  12. wpsecuritylock
    Member
    Posted 3 years ago #

    I am a user of HostGator myself. However my client prefers MT so I need to get this fixed.

  13. AdamC.
    Member
    Posted 3 years ago #

    I'm having the same issue with the same file on one of my sites: Deprecated: Assigning the return value of new by reference is deprecated in /home/name/public_html/wp-includes/class-simplepie.php

    Also getting a similar error when using the search bar on the site: Deprecated: Assigning the return value of new by reference is deprecated in /home/name/public_html/wp-content/themes/themename/search.php on line 3

    It conducts the search properly, but the error appears at the top of the screen, and the template becomes distorted.

  14. producerism
    Member
    Posted 3 years ago #

    same problem here, haven't found a solution yet. Tried ini_set on error_reporting and display_errors without avail. None of the other proposed solutions have worked for me yet, still trying to figure out the issue.

  15. salty-sailor
    Member
    Posted 3 years ago #

    @wpsecuritylock, @AdamC., @producerism, @SooBahkDo, @The8thLegion, @Sawtooth500:
    In case you still need to resolve this error, HERE IS A SIMPLE FIX

    1. Open /wp-includes/class-simplepie.php in your editing tool.
    2. Find instances of this text: &$
    3. Replace with $
    4. Save, and if required, upload to your server
    5. Reload the page on which you were seeing, "Assigning the return value of new by reference is deprecated"

    For a complete, articulate explanation of this, see: this thread.

    Happy editing!

  16. Cristian Balan
    Member
    Posted 3 years ago #

    @salty-sailor, this is not enough for me. In that file have also &_gt; / &_lt; / &= / =& / && / &_amp; / ... (who know?)

    I must replace hims?

  17. salty-sailor
    Member
    Posted 3 years ago #

    @ovib, to show code, bookend it with the backtick symbol usually located on the same key as the ~ symbol. I'm not clear what you mean by the code you tried to share:

    In that file have also
    &_gt; / &_lt; / &= / =& / && / &_amp; /
    I must replace hims (sic)?

    Do you mean you find this code? Are the slashes to denote new code snippets?
    </> /&= /=& / && / & /
    In your php, don't go replacing every instance of &. There is a specific reason to replace the &$ with $ and the reason for it is documented in the thread to which I provided a link.

  18. wp_sam
    Member
    Posted 3 years ago #

    I am getting only one error when I run it in debug mode - Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( 'custom-background', $args ) instead. in /home2/speakwi4/public_html/wp-includes/functions.php any fix available??

  19. esmi
    Forum Moderator
    Posted 3 years ago #

    @wp_sam: Please post your own topic.

  20. wp_sam
    Member
    Posted 3 years ago #

  21. ndenitto
    Member
    Posted 2 years ago #

    @esmi: can we formally request a compatibility update to class-simplepie.php? I'm having the same problem as @wpsecuritylock. Mediatemple tends to update software without warning, so anyone on a Mediatemple gridserver using WordPress is likely seeing this issue..

  22. nateinaction
    Member
    Posted 2 years ago #

    I am seeing this issue as well.

  23. nicolaelvin
    Member
    Posted 2 years ago #

    I am as well, is there a fix yet?

  24. ldwp
    Member
    Posted 2 years ago #

    I'm seeing the same thing if I turn on full error reporting in PHP, using PHP 5.3 and wordpress 3.4.2.

    In my case I'm using feed.php and simplepie to parse an RSS feed, the error seems to be thrown 20 or 30 times, perhaps once for each property of each RSS entry?

    As far as I can see not everyone will be seeing it unless they have error reporting turned on, but a compatibility fix would be a good idea as just because the errors aren't visible doesn't mean they don't need to be fixed. At the very least it will be filling up alot of log files...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.