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 dc2e925 commit 695097cCopy full SHA for 695097c
src/Illuminate/Foundation/Application.php
@@ -609,7 +609,9 @@ public function isProduction()
609
*/
610
public function detectEnvironment(Closure $callback)
611
{
612
- $args = $_SERVER['argv'] ?? null;
+ $args = $this->runningInConsole() && $_SERVER['argv']
613
+ ? $_SERVER['argv']
614
+ : null;
615
616
return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
617
}
0 commit comments