From e957d06913d54c9ebfb446990f26e2fec8211d80 Mon Sep 17 00:00:00 2001
From: Ruben Van Assche <ruben@spatie.be>
Date: Thu, 4 Mar 2021 09:47:38 +0100
Subject: [PATCH] fix ignition not working when there is no argv

---
 CHANGELOG.md                    | 4 ++++
 src/IgnitionServiceProvider.php | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9322b1ff..f9c349bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 All notable changes to `ignition` will be documented in this file
 
+## 2.5.13 - 2021-03-03
+
+- fix ignition not working when there is no argv
+
 ## 2.5.13 - 2021-02-16
 
 - remove custom grouping
diff --git a/src/IgnitionServiceProvider.php b/src/IgnitionServiceProvider.php
index 976dbc92..5f5bbe06 100644
--- a/src/IgnitionServiceProvider.php
+++ b/src/IgnitionServiceProvider.php
@@ -79,7 +79,7 @@ public function boot()
                 __DIR__.'/../config/ignition.php' => config_path('ignition.php'),
             ], 'ignition-config');
 
-            if (['artisan', 'tinker'] === $_SERVER['argv']) {
+            if (isset($_SERVER['argv']) && ['artisan', 'tinker'] === $_SERVER['argv']) {
                 Api::sendReportsInBatches(false);
             }
         }