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 88dd075 commit 639b222Copy full SHA for 639b222
src/Illuminate/Foundation/Application.php
@@ -557,7 +557,9 @@ public function isProduction()
557
*/
558
public function detectEnvironment(Closure $callback)
559
{
560
- $args = $_SERVER['argv'] ?? null;
+ $args = $this->runningInConsole() && $_SERVER['argv']
561
+ ? $_SERVER['argv']
562
+ : null;
563
564
return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
565
}
0 commit comments