From d431c3f767a8cbf8beef76f7ad2546b458bcd5e8 Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Sun, 19 Jun 2016 23:23:03 +0100 Subject: [PATCH] Permit flags in the config --- includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 7d9765c6..0edc4939 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -21,9 +21,10 @@ function GetDistString( $input,$string,$offset,$separator ) { function ParseConfig( $arrConfig ) { $config = array(); foreach( $arrConfig as $line ) { - if( $line[0] != "#" ) { + $line = trim($line); + if( $line != "" && $line[0] != "#" ) { $arrLine = explode( "=",$line ); - $config[$arrLine[0]] = $arrLine[1]; + $config[$arrLine[0]] = ( count($arrLine) > 1 ? $arrLine[1] : true ); } } return $config;