fix Common.php to check if ENVIRONMENT constant is empty