Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ed9430a

Browse files
Applailuuu1994
authored andcommitted
Fix hard_timeout when zend-max-execution-timers is enabled
Closes GH-19786
1 parent 901f71e commit ed9430a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PHP NEWS
55
- Core:
66
. Fixed bug GH-19765 (object_properties_load() bypasses readonly property
77
checks). (timwolla)
8+
. Fixed hard_timeout with --enable-zend-max-execution-timers. (Appla)
89

910
- Standard:
1011
. Fixed bug GH-12265 (Cloning an object breaks serialization recursion).

‎Zend/zend_execute_API.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,9 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
15311531
return;
15321532
}
15331533
#elif defined(ZEND_MAX_EXECUTION_TIMERS)
1534-
zend_max_execution_timer_settime(seconds);
1534+
if (seconds > 0) {
1535+
zend_max_execution_timer_settime(seconds);
1536+
}
15351537

15361538
if (reset_signals) {
15371539
sigset_t sigset;
@@ -1618,7 +1620,9 @@ void zend_unset_timeout(void) /* {{{ */
16181620
tq_timer = NULL;
16191621
}
16201622
#elif ZEND_MAX_EXECUTION_TIMERS
1621-
zend_max_execution_timer_settime(0);
1623+
if (EG(timeout_seconds)) {
1624+
zend_max_execution_timer_settime(0);
1625+
}
16221626
#elif defined(HAVE_SETITIMER)
16231627
if (EG(timeout_seconds)) {
16241628
struct itimerval no_timeout;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /