...ettings() so if PiwikOption holds different configuration than config file it, proper values are taken to calculations.
How to reproduce original error: - Enable log deleting in config.ini.php with small interval (i.e. 1 day) - override those options via UI with bigger interval (i.e. 90 days) - try to use invalidateArchivedReports() method with date between 1 and 90 days back from today - it will cause warning and reports for given date will not be invalidated even though they actually could be.
This patch fixes this behaviour so the same dates are being considered in both places.
Thanks for the Pull request & fix!