Config: fixed interpreting invalid keys as empty strings

these should just be ignored completely.
This commit is contained in:
Dylan K. Taylor 2018-07-08 11:50:17 +01:00
parent e0bc9c5e96
commit f1cab91ac9

View File

@ -550,7 +550,7 @@ class Config{
* @param string $content * @param string $content
*/ */
private function parseProperties(string $content){ private function parseProperties(string $content){
if(preg_match_all('/([a-zA-Z0-9\-_\.]*)=([^\r\n]*)/u', $content, $matches) > 0){ //false or 0 matches if(preg_match_all('/([a-zA-Z0-9\-_\.]+)=([^\r\n]*)/u', $content, $matches) > 0){ //false or 0 matches
foreach($matches[1] as $i => $k){ foreach($matches[1] as $i => $k){
$v = trim($matches[2][$i]); $v = trim($matches[2][$i]);
switch(strtolower($v)){ switch(strtolower($v)){