Skip to content

Commit

Permalink
Protection against trying to clean up log files prematurely
Browse files Browse the repository at this point in the history
  • Loading branch information
jegelstaff committed Nov 9, 2024
1 parent 38a699e commit 84369e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/formulize/include/writeToFormulizeLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 84369e5

Please sign in to comment.