aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.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/feedController.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/feedController.php')
-rw-r--r--app/Controllers/feedController.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index ea336811c..a9cb51416 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -36,7 +36,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
public static function addFeed(string $url, string $title = '', int $cat_id = 0, string $new_cat_name = '',
string $http_auth = '', array $attributes = [], int $kind = FreshRSS_Feed::KIND_RSS): FreshRSS_Feed {
FreshRSS_UserDAO::touch();
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$catDAO = FreshRSS_Factory::createCategoryDao();
@@ -329,7 +331,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
*/
public static function actualizeFeed(int $feed_id, string $feed_url, bool $force, ?SimplePie $simplePiePush = null,
bool $noCommit = false, int $maxFeeds = 10): array {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
$feedDAO = FreshRSS_Factory::createFeedDao();
$entryDAO = FreshRSS_Factory::createEntryDao();
@@ -875,7 +879,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
* @throws FreshRSS_BadUrl_Exception
*/
public function reloadAction(): void {
- @set_time_limit(300);
+ if (function_exists('set_time_limit')) {
+ @set_time_limit(300);
+ }
//Get Feed ID.
$feed_id = Minz_Request::paramInt('id');