diff --git a/lib/functions/filedir/function.makeCorrectFile.php b/lib/functions/filedir/function.makeCorrectFile.php index 752439aa..2d4d9c45 100644 --- a/lib/functions/filedir/function.makeCorrectFile.php +++ b/lib/functions/filedir/function.makeCorrectFile.php @@ -29,6 +29,15 @@ function makeCorrectFile($filename) { + if (!isset($filename) + || trim($filename) == '' + ) { + $error = 'Given filename for function '.__FUNCTION__.' is empty.'."\n"; + $error.= 'This is very dangerous and should not happen.'."\n"; + $error.= 'Please inform the Froxlor team about this issue so they can fix it.'; + die($error); + } + if(substr($filename, 0, 1) != '/') { $filename = '/' . $filename;