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.
Built from https://develop.svn.wordpress.org/trunk@55305


git-svn-id: http://core.svn.wordpress.org/trunk@54838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-02-11 12:43:22 +00:00
parent 09cc873d3a
commit 42d571decb
2 changed files with 7 additions and 3 deletions

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

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta1-55304';
$wp_version = '6.2-beta1-55305';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.