From ca2aeb44eb6fc19b62bea6274851dc63ea83892b Mon Sep 17 00:00:00 2001 From: Uwe Grasshoff Date: Sat, 11 Aug 2018 17:38:47 +0200 Subject: [PATCH] * added a isset check for $argv so that php is not blaming about an uninitialized variable --- functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 1abae9c..a9ea6ba 100644 --- a/functions.php +++ b/functions.php @@ -6,10 +6,12 @@ $quiet = false; //Check passed options -foreach ($argv as $option) { - if ($option === "--quiet") { - $quiet = true; - } +if(isset($argv)){ + foreach ($argv as $option) { + if ($option === "--quiet") { + $quiet = true; + } + } } const SUCCESS = 'success';