Skip to content

Commit 13c1429

Browse files
authored
Fix #17948: Ignore errors caused by set_time_limit(0)
1 parent 355ca15 commit 13c1429

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
44
2.0.35 under development
55
------------------------
66

7+
- Bug #17948: Ignore errors caused by `set_time_limit(0)` (brandonkelly)
78
- Bug #17810: Fix EachValidator crashing with uninitialized typed properties (ricardomm85)
89
- Bug #17942: Fix for `DbCache` loop in MySQL `QueryBuilder` (alex-code)
910

framework/web/Response.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,8 @@ protected function sendContent()
430430
return;
431431
}
432432

433-
if (function_exists('set_time_limit')) {
434-
set_time_limit(0); // Reset time limit for big files
435-
} else {
433+
// Try to reset time limit for big files
434+
if (!function_exists('set_time_limit') || !@set_time_limit(0)) {
436435
Yii::warning('set_time_limit() is not available', __METHOD__);
437436
}
438437

0 commit comments

Comments
 (0)