It’s possible that your $http_host
isn’t in the list of possible choices. You can always check first that the ENVIRONMENT
constant has actually been defined:
if ( defined( 'ENVIRONMENT' ) && 'local' === ENVIRONMENT ) {
define('ASSETSDIR', get_template_directory_uri() . '/assets');
} else {
define('ASSETSDIR', $dist_dir . '/assets');
}