Make WordPress Core

Changeset 55305


Ignore:
Timestamp:
02/11/2023 12:41:34 PM (22 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-pop3.php

    r55073 r55305  
    6060            settype($timeout,"integer");
    6161            $this->TIMEOUT = $timeout;
    62             set_time_limit($timeout);
     62            if(function_exists("set_time_limit")){
     63                set_time_limit($timeout);
     64            }
    6365        }
    6466        return true;
     
    7375
    7476    function update_timer () {
    75         set_time_limit($this->TIMEOUT);
     77        if(function_exists("set_time_limit")){
     78            set_time_limit($this->TIMEOUT);
     79        }
    7680        return true;
    7781    }
Note: See TracChangeset for help on using the changeset viewer.