Exteme slowdown in site with 3.4.2 – Error log included.
-
Upon using WordPress 3.4.2 I had an issue with a website running very slow. I then lodged a support ticket with my hosting provider who investigated this for me. They came back with the following.
———————
I checked the error logs for the website and found the following error occurring quite a lot.
[Sat Sep 29 04:15:20 2012] [error] [client 66.249.74.124] PHP Warning:
Invalid argument supplied for foreach() in
/var/www/vhosts/micksgym247.com.au/httpdocs/wp-includes/query.php on
line 2762I have fixed this error by replacing
// Always sanitize
foreach ( $this->posts as $i => $post ) {
$this->posts[$i] = sanitize_post( $post, ‘raw’ );
}with
// Always sanitize
if ( $this->post_count > 0 ) {
foreach ( $this->posts as $i => $post ) {
$this->posts[$i] = sanitize_post( $post, ‘raw’ );
}
}in wp-includes/query.php
———————
Is this a known error, and if not, why would this happen on a brand new install of WordPress?
- The topic ‘Exteme slowdown in site with 3.4.2 – Error log included.’ is closed to new replies.