Site icon Hip-Hop Website Design and Development

PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML() when a GET request is made by UptimeRobot

This is an odd one and has me stumped. Each time UptimeRobot checks if a site is up and running, it sends a GET request every 5 minutes.

The debug.log file is being filled with the same error message below every 5 minutes. The error message does not display when it’s accessed by a user.

The code in Line 272 is $output = $dom->loadHTML( $output, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );

PHP Fatal error:  
Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in 
functions.php:272
Stack trace:
#0 functions.php(272): DOMDocument->loadHTML('', 8196)
#1 /wp-includes/class-wp-hook.php(303): wpse_html_attribute('')
#2 /wp-includes/plugin.php(189): WP_Hook->apply_filters('', Array)
#3 functions.php(246): apply_filters('wpse_final_outp...', '')
#4 /wp-includes/class-wp-hook.php(303): wpse_ob_clean('')
#5 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#6 /wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#7 /wp-includes/load.php(1097): do_action('shutdown')
#8 [internal function]: shutdown_action_hook()
#9 {main}
  thrown in functions.php on line 272