Don’t panic if you see this type of error. despite the fact that this error will not popup if there is nothing wrong with you wordpress blog or site, there is still a chance for you fix it as if nothing just happened.
Okay now let’s fix.
Quickly log into your server through your FTP and let’s open some couple of files with extreme care in order not to break anything.
1. Open your wp-config.php file and paste the below code at the bottom of this file
1 2 3 |
define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( ‘display_errors’, 0 ); |
2. Open your functions.php file in your theme’s directory ie …/wp-content/theme/function.php and paste the below code at the bottom of this file
1 2 3 4 5 6 7 8 9 |
function warning_squelch_wpe(int $errno , string $errstr , string $errfile , int $errline , array $errcontext) { if(strstr($errstr, "expected to be a reference")) { return true; // squelch matching warnings } // allow normal handling for non-matching warnings return false; } set_error_handler("warning_squelch_wpe", E_WARNING); |
3. Last thing Open your config.php file in your site directory and paste the below code at the bottom of this file
1 2 3 4 |
#custom heartbeat - stop the warning from WPE # see https://www.thetwopercent.co.uk/solved-warning-parameter-1-to-wp_default_scripts/ define( 'WPE_HEARTBEAT_INTERVAL', 15 ); |
All done now try the magic reload of your site to see if the issue still persist. if yes please let me know in the comment below i will help you to fix this issue.
Leave a comment