Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions includes/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,10 @@ function esse_log( string $message, string $level = 'info' ): void {
* @return int Current PHP execution time limit in seconds.
*/
function esse_get_execution_time_limit(): int {
// Get the current execution time limit.
// Get the current execution time limit. PHP always defines max_execution_time, so ini_get()
// returns a string for it, never false.
$max_exec_time = ini_get( 'max_execution_time' );

// Handle all possible return types from ini_get().
if ( false === $max_exec_time ) {
// Ini_get failed.
return 30;
}

if ( '' === $max_exec_time ) {
// Empty string returned.
return 30;
Expand Down
Loading