You likely want to change your error reporting directive in the PHP.ini file. If you have only E_ALL then you will get notices in addition to Errors. Notices produce non critical errors for vriables not being set.
The default to show Errors and not (~) Notices is..
error_reporting = E_ALL & ~E_NOTICE
This can be set in the PHP.ini The error setting can also be set within the script to override the ini setting.