You can disable notices by setting error reporting level to E_ALL & ~E_NOTICE;
using either error_reporting
ini setting or the error_reporting()
function.
However, notices are annoying (I can partly sympathize) but they serve a purpose. You shouldn’t be defining a constant twice, the second time won’t work and the constant will remain unchanged!