How can I hide a certain warning message showing to users?
You need to include ini_set( 'display_errors','0'); in your setting.php file in drupal site.

See more about error reporting 
http://php.net/manual/en/function.error-reporting.php 

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)

ini_set( 'display_errors','0');