MVC, config: fix getBackupFilename(), floats aren't really safe to use of we only want to split the number part.

This commit is contained in:
Ad Schellevis 2020-03-10 10:47:14 +01:00
parent faf71c7e70
commit fc60d04cd6

View File

@ -566,7 +566,7 @@ class Config extends Singleton
*/
public function getBackupFilename($revision)
{
$tmp = (float)$revision;
$tmp = preg_replace("/[^0-9.]/", $revision);
$bckfilename = dirname($this->config_file) . "/backup/config-{$tmp}.xml";
if (is_file($bckfilename)) {
return $bckfilename;