From 414200a68139341fff1db876d120106ce0ae1b87 Mon Sep 17 00:00:00 2001 From: datorik Date: Wed, 10 Jun 2026 17:21:20 +0300 Subject: [PATCH] Code. Get time limit from hosting --- lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php b/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php index 3024100b7..1cffda157 100644 --- a/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php +++ b/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php @@ -106,7 +106,11 @@ public function __construct($stage = '', $offset = null, $amount = null, $root_d { global $spbc; - @set_time_limit(120); // Increasing Script execution time + // Increasing Script execution time + $current_time_limit = (int)ini_get('max_execution_time'); + if ($current_time_limit > 0 && $current_time_limit < 120) { + @set_time_limit(120); + } $this->db = DB::getInstance();