How can I make wordpress suppress mysql errors?

WordPress has two functions related to SQL queries and their errors as mentioned in What Is The Difference Between suppress_errors() And hide_errors() in $wpdb? From what I’ve read setting WP_DEBUG to false in wp-config.php will set hide_errors() so that mySql errors aren’t show – but if the site can’t connect to the database you’ll still … Read more

Plugin.php: PHP Notice: Undefined offset: 0 in

I moved a WordPress site from one domain to another and there were a lot of white spaces that needed to be removed. The only problem that is left are the following errors: PHP Notice: Undefined offset: 0 in /home/linguist/public_html/test/wp-includes/plugin.php on line 767 PHP Notice: Undefined offset: 0 in /home/linguist/public_html/test/wp-includes/plugin.php on line 785 then further … Read more

wp_generate_attachment_metadata generates 503 Service Unavailable or 500 timeout errors

I’ve been struggling for a week with this… I was trying to upload an image with media_handle_upload but it never worked (it always timed out), so I decided to break it down to see where it failed and I wrote this: if ( move_uploaded_file($file[“tmp_name”], $target_file) ) { $wp_filetype = wp_check_filetype($filename, null); $attachment = array( ‘post_author’ … Read more