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 99fa2e3 commit eded6bdCopy full SHA for eded6bd
src/Illuminate/Foundation/Application.php
@@ -602,7 +602,9 @@ public function isProduction()
602
*/
603
public function detectEnvironment(Closure $callback)
604
{
605
- $args = $_SERVER['argv'] ?? null;
+ $args = $this->runningInConsole() && $_SERVER['argv']
606
+ ? $_SERVER['argv']
607
+ : null;
608
609
return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
610
}
0 commit comments