We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ccb4dc commit 8c07b63Copy full SHA for 8c07b63
src/Illuminate/Foundation/Application.php
@@ -696,7 +696,9 @@ public function isProduction()
696
*/
697
public function detectEnvironment(Closure $callback)
698
{
699
- $args = $_SERVER['argv'] ?? null;
+ $args = $this->runningInConsole() && $_SERVER['argv']
700
+ ? $_SERVER['argv']
701
+ : null;
702
703
return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
704
}
0 commit comments