[Bug] detectEnvironment no longer returning environment string

`app/bootstrap/start.php`'s assignment of the global `$env` is failing because
`detectEnvironment` is no longer returning the environment string it's
supposed to.