Solution:
I don’t know if you wanna fix the reason of the issue or just get rid of the Warning? Have you tried to switch debug mode to false in wp-config.php?
define( ‘WP_DEBUG’, false );