I just want to point out, This will hide all messages from plugins and core that use the error class. You could potentially miss an important message. Just an FYI. I am looking for a better way to supress the message but yoast uses a really simple function. You can remove the function from the plugin file but that gets overwritten on update.