Skip to content

Commit 639b222

Browse files
committed
version
1 parent 88dd075 commit 639b222

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Foundation/Application.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,9 @@ public function isProduction()
557557
*/
558558
public function detectEnvironment(Closure $callback)
559559
{
560-
$args = $_SERVER['argv'] ?? null;
560+
$args = $this->runningInConsole() && $_SERVER['argv']
561+
? $_SERVER['argv']
562+
: null;
561563

562564
return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
563565
}

0 commit comments

Comments
 (0)