From 84369e5387c3a4e452bebfdd808c38b8bd0a9242 Mon Sep 17 00:00:00 2001 From: Julian Egelstaff Date: Sat, 9 Nov 2024 11:28:07 -0500 Subject: [PATCH] Protection against trying to clean up log files prematurely --- modules/formulize/include/writeToFormulizeLog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/formulize/include/writeToFormulizeLog.php b/modules/formulize/include/writeToFormulizeLog.php index 893c0fb50..7bf5e94e9 100644 --- a/modules/formulize/include/writeToFormulizeLog.php +++ b/modules/formulize/include/writeToFormulizeLog.php @@ -65,7 +65,7 @@ function writeToFormulizeLog($data) { if(!$formulizeLoggingOnOff OR !$formulizeLogFileLocation OR !is_dir($formulizeLogFileLocation)) { return false; } // cleanup old log files (last param requires seconds) -- only once per page load - if(!$logFilesCleanedUp) { + if(!$logFilesCleanedUp AND function_exists('formulize_scandirAndClean')) { formulize_scandirAndClean($formulizeLogFileLocation, 'formulize_log_', $formulizeLogFileStorageDurationHours * 60 * 60); $logFilesCleanedUp = true; }