From b82c41f6b99be467dab5c561deefbe01eee50b8d Mon Sep 17 00:00:00 2001 From: "VYSE V.E.O" Date: Thu, 28 Sep 2023 03:40:05 +0800 Subject: Test if set_time_limit exists (#5675) * Fix @set_time_limit as @-operator after PHP8 no longer suppresses disabled functions * preserve @ decorator * Fix whitespace --------- Co-authored-by: Alexandre Alapetite --- app/Services/ImportService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Services') diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index e92351c0f..b70627295 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -34,7 +34,9 @@ class FreshRSS_Import_Service { * @param bool $dry_run true to not create categories and feeds in database. */ public function importOpml(string $opml_file, ?FreshRSS_Category $forced_category = null, bool $dry_run = false): void { - @set_time_limit(300); + if (function_exists('set_time_limit')) { + @set_time_limit(300); + } $this->lastStatus = true; $opml_array = []; try { -- cgit v1.2.3