From dd3c912aebe05d36115cf78cec83b35e321f8f09 Mon Sep 17 00:00:00 2001 From: Gustavo Arnosti Neves Date: Thu, 26 Jul 2018 06:27:04 -0300 Subject: [PATCH] v0.2.0 - a bit more option parsing; fix run with empty JSON options; added more excluded files; changed excluded parsing; a bit more error messages; added PHP hashbang and made file executable --- dir2json.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dir2json.php b/dir2json.php index 6950903..7ce7562 100755 --- a/dir2json.php +++ b/dir2json.php @@ -47,7 +47,8 @@ function dir2json($dir) } // Long and short help opts -if ($argv[1] === "-h" || $argv[1] === "--help") +$param = isset($argv[1]) ? $argv[1] : ''; +if ($param === "-h" || $param === "--help") { echo <<