From be797d2f7ae73e47ea3845a0008ce8bb80849825 Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Sat, 17 Jun 2017 22:18:41 +0300 Subject: [PATCH] Suppress warnings about set_time_limit being disabled. Some hosts disable set_time_limit() and a few other functions. Calling the disabled function triggers a warning. In our case, using set_time_limit() is optional - PUC will usually work fine even if it can't increase the time limit - so lets just ignore the warning and carry on. Reported in #111. --- Puc/v4p1/Vcs/PluginUpdateChecker.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Puc/v4p1/Vcs/PluginUpdateChecker.php b/Puc/v4p1/Vcs/PluginUpdateChecker.php index 25a496e..9068f82 100644 --- a/Puc/v4p1/Vcs/PluginUpdateChecker.php +++ b/Puc/v4p1/Vcs/PluginUpdateChecker.php @@ -32,7 +32,9 @@ if ( !class_exists('Puc_v4p1_Vcs_PluginUpdateChecker') ): public function requestInfo($unusedParameter = null) { //We have to make several remote API requests to gather all the necessary info //which can take a while on slow networks. - set_time_limit(60); + if ( function_exists('set_time_limit') ) { + @set_time_limit(60); + } $api = $this->api;