aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/entryController.php
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/Controllers/entryController.php
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/Controllers/entryController.php')
-rw-r--r--app/Controllers/entryController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php
index f334ce0a6..95ac9ee39 100644
--- a/app/Controllers/entryController.php
+++ b/app/Controllers/entryController.php
@@ -169,7 +169,9 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
Minz_Request::forward($url_redirect, true);
}
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
$databaseDAO->optimize();
@@ -188,7 +190,9 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
* @todo should be in feedController
*/
public function purgeAction(): void {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$feedDAO = FreshRSS_Factory::createFeedDao();
$feeds = $feedDAO->listFeeds();