aboutsummaryrefslogtreecommitdiff
path: root/app/Services
diff options
context:
space:
mode:
authorGravatar VYSE V.E.O <VEO@LIVE.COM> 2023-09-28 03:40:05 +0800
committerGravatar GitHub <noreply@github.com> 2023-09-27 21:40:05 +0200
commitb82c41f6b99be467dab5c561deefbe01eee50b8d (patch)
treea2557c65fb189bbe330f28892de6eb4a36b927c8 /app/Services
parent89a3d36c3e680bcbaf361ff60ca96b3e79f42968 (diff)
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 <alexandre@alapetite.fr>
Diffstat (limited to 'app/Services')
-rw-r--r--app/Services/ImportService.php4
1 files changed, 3 insertions, 1 deletions
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 {