fix: strstr won't return anything if nfsensuffix is empty

This commit is contained in:
jaroug
2016-07-20 12:49:38 +02:00
parent 87eb2a6d5f
commit 78170213d2
2 changed files with 2 additions and 2 deletions

View File

@@ -370,7 +370,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) {
}
$basefilename_underscored = preg_replace('/\./', $config['nfsen_split_char'], $device['hostname']);
$nfsen_filename = (strstr($basefilename_underscored, $nfsensuffix, true));
$nfsen_filename = preg_replace('/'.$nfsensuffix.'/', '', $basefilename_underscored);
if (is_file($nfsenrrds.$nfsen_filename.'.rrd')) {
$nfsen_rrd_file = $nfsenrrds.$nfsen_filename.'.rrd';
}