The problem occurred after I had migrated a website.
The homepage shows a white page with just this error. If I visit the WordPress login page, I get another white page with a similar error.
Fix that worked for me:
I checked the wp-config.php file.
I found that it was incomplete!
This is all that was in it:
I copied the original wp-config.php file and edited it to show the new DB name, user and password. Problem solved!
I hope this works for you too.