WordPress Upgrade 2.9.0 + a bug

Okay, I have rolled the usual 'upgrade all instances of wordpress' script however there is a bug in the current wordpress.

Heres your script to upgrade them all.
wget http://b.ri.mu/files/wordpress-upgrade-2.9.0.sh ; sh wordpress-upgrade-2.9.0.sh

Heres the info in the bug. If you see a lot of this in your error log and your site is being repeatedly hit

[Tue Dec 22 06:26:14 2009] [error] [client 72.xxx.xx.23] PHP Fatal error: Call to undefined method WP_Error::__destruct() in /var/www/sitename.com/html/wp-includes/default-widgets.php on line 735
[Tue Dec 22 06:26:15 2009] [error] [client 72.xxx.xx.23] PHP Fatal error: Call to undefined method WP_Error::__destruct() in /var/www/sitename.com/html/wp-includes/default-widgets.php on line 735
[Tue Dec 22 06:26:16 2009] [error] [client 72.xxx.xx.23] PHP Fatal error: Call to undefined method WP_Error::__destruct() in /var/www/sitename.com/html/wp-includes/default-widgets.php on line 735
[Tue Dec 22 06:26:18 2009] [error] [client 72.xxx.xx.23] PHP Fatal error: Call to undefined method WP_Error::__destruct() in /var/www/sitename.com/html/wp-includes/default-widgets.php on line 735

And heres the bug fix. http://b.ri.mu/files/default-widgets.patch
Edit $sitedir/wp-includes/default-widgets.php
Line 735 has the line

                         $rss->__destruct();

replace with

if ( ! is_wp_error($rss) )
                         $rss->__destruct();

I've written a patch that will patch it for you with

patch default-widgets.php < default-widgets.patch

If you need to patch a lot of sites at the same time, run the upgrade script then do something akin to

find /var/www -name default-widgets.php | while read filename ; do echo patching $filename ; patch $filename < /root/default-widgets.patch ; done
This entry was posted in Rimuhosting and tagged , , , , , , , , . Bookmark the permalink.

Comments are closed.