Skip to content

Commit 525fd12

Browse files
committed
Fix max_execution_time being set to 30 and not 0
This was a regression introduced in 76dcd3f. Changing the loose == operators to strict === caused behavior to change. max_execution_time got set to 30 instead of 0 as intended. Fix by calling intval() so that the === comparisons work.
1 parent 438c6b8 commit 525fd12

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Unreleased
22

3+
- Fix max_execution_time being set to 30 instead of 0.
4+
35
## Static Deploy 9.0.0 (2025-07-16)
46

57
This is the first release under the name Static Deploy.

src/Utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public static function set_max_execution_time(): void {
5858
return;
5959
}
6060

61-
$current_max_execution_time = ini_get( 'max_execution_time' );
61+
$current_max_execution_time = intval( ini_get( 'max_execution_time' ) );
6262
$proposed_max_execution_time =
6363
( $current_max_execution_time === 30 ) ? 31 : 30;
6464
set_time_limit( $proposed_max_execution_time );
65-
$current_max_execution_time = ini_get( 'max_execution_time' );
65+
$current_max_execution_time = intval( ini_get( 'max_execution_time' ) );
6666

6767
if ( $proposed_max_execution_time === $current_max_execution_time ) {
6868
set_time_limit( 0 );

0 commit comments

Comments
 (0)