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.
This commit is contained in:
Yahnis Elsts 2017-06-17 22:18:41 +03:00
parent 8f39bceb12
commit be797d2f7a
1 changed files with 3 additions and 1 deletions

View File

@ -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;