You could turn all warnings off:

error_reporting(E_ALL ^ E_WARNING);

I wouldn't recommend that though. Instead, you could just turn them for the function you want to prevent warning display for.