mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Setup: Fix backups to keep of 0 gave an error "must be integer"
This commit is contained in:
parent
66ee6576f1
commit
fa9eda18b8
@ -87,10 +87,10 @@ else
|
|||||||
if ($_POST['save_backup_settings'])
|
if ($_POST['save_backup_settings'])
|
||||||
{
|
{
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match('/^[1-9][0-9]*$/', $_POST['backup_mincount'], $matches);
|
preg_match('/^\d*$/', $_POST['backup_mincount'], $matches);
|
||||||
$minCount = $matches[0];
|
$minCount = (int)$matches[0];
|
||||||
$filesBackup = $_POST['backup_files'] === 'backup_files';
|
$filesBackup = $_POST['backup_files'] === 'backup_files';
|
||||||
if (empty($minCount))
|
if (empty($minCount) && $matches[0] != '0')
|
||||||
{
|
{
|
||||||
$minCount = 0;
|
$minCount = 0;
|
||||||
$setup_tpl->set_var('error_msg',htmlspecialchars(lang("'%1' must be integer", lang("backup min count"))));
|
$setup_tpl->set_var('error_msg',htmlspecialchars(lang("'%1' must be integer", lang("backup min count"))));
|
||||||
|
Loading…
Reference in New Issue
Block a user