Mail: Check that set_time_limit() function is available before using it in class-pop3.php.

This avoids a fatal error if the function is disabled on certain environments.

Follow-up to [55258].

Props mujuonly.
Fixes #57659.

git-svn-id: https://develop.svn.wordpress.org/trunk@55305 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2023-02-11 12:41:34 +00:00
parent 099ff6c5fe
commit aa325d4005

View File

@ -59,7 +59,9 @@ class POP3 {
if(!empty($timeout)) {
settype($timeout,"integer");
$this->TIMEOUT = $timeout;
set_time_limit($timeout);
if(function_exists("set_time_limit")){
set_time_limit($timeout);
}
}
return true;
}
@ -72,7 +74,9 @@ class POP3 {
}
function update_timer () {
set_time_limit($this->TIMEOUT);
if(function_exists("set_time_limit")){
set_time_limit($this->TIMEOUT);
}
return true;
}