From d6235f412181f1c188ecf841d477490891b0de4c Mon Sep 17 00:00:00 2001 From: pxgamer Date: Tue, 30 Oct 2018 09:18:20 +0000 Subject: [PATCH] Set a sanity interval fallback if it isn't set --- sanity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sanity.php b/sanity.php index c76ed32..8272281 100755 --- a/sanity.php +++ b/sanity.php @@ -48,12 +48,12 @@ if (file_exists(SANITY_LOCK_PATH)) { $pid_time = filemtime(SANITY_LOCK_PATH); // If the process died, restart after 3 times the sanity interval - if (time() - $pid_time > ($_config['sanity_interval'] * 3)) { + if (time() - $pid_time > ($_config['sanity_interval'] ?? 900 * 3)) { @unlink(SANITY_LOCK_PATH); } if (!$ignore_lock) { - die("Sanity lock in place"); + die("Sanity lock in place".PHP_EOL); } }