From 42d571decb7dcac584a28b78682deae759cdfc93 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 11 Feb 2023 12:43:22 +0000 Subject: [PATCH] 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 --- wp-includes/class-pop3.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-pop3.php b/wp-includes/class-pop3.php index 2fa60110e2..7a72b1caf8 100644 --- a/wp-includes/class-pop3.php +++ b/wp-includes/class-pop3.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d0ed208f86..f0b4373c76 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.