From 2976a4af9ce5d31ae39ab8a57db6833ec1e41f33 Mon Sep 17 00:00:00 2001 From: moudsen Date: Sat, 17 Jul 2021 23:45:50 +0200 Subject: [PATCH] Fixed a bug when configuration file is empty --- config/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.php b/config/config.php index 23318c8..d5716d8 100644 --- a/config/config.php +++ b/config/config.php @@ -27,7 +27,7 @@ $content = file_get_contents($argv[1]); $data = json_decode($content,TRUE); - if ($data==NULL) + if (($data==NULL) && (sizeof($content)>2)) { echo 'Invalid JSON format in config file?!'.$cCRLF; die; @@ -138,4 +138,4 @@ default: echo 'Unknown command?'.$cCRLF; } -?> \ No newline at end of file +?>