turn off only warning and notice from erro php code example
Example: how to remove notice error in php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);