From 5174b839ea4a72d4edcf2d5889442c4f0bef7ff7 Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Fri, 26 Jan 2018 14:02:35 +0200
Subject: [PATCH] Fix minimum age check in expiration util.

---
 .../src/VuFindConsole/Controller/UtilController.php             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
index ba7f0c2c74a..800c6fadd2e 100644
--- a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
+++ b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
@@ -695,7 +695,7 @@ class UtilController extends AbstractBase
         $sleepTime = $request->getParam('sleep', 100);
 
         // Abort if we have an invalid expiration age.
-        if ($daysOld < 2) {
+        if ($daysOld < $minAge) {
             Console::writeLine(
                 str_replace(
                     '%%age%%', $minAge,
-- 
GitLab