Browse Source

Fix #16531: Fix error in `Response::sendContent()` when `set_time_limit()` is disabled

tags/2.0.26
Brandon Kelly 5 years ago committed by Alexander Makarov
parent
commit
37df938338
  1. 1
      framework/CHANGELOG.md
  2. 7
      framework/web/Response.php

1
framework/CHANGELOG.md

@ -11,6 +11,7 @@ Yii Framework 2 Change Log
- Bug #17355: Fixed Pjax after request event bug (kamarton)
- Bug #17522: `DbManager::isEmptyUserId()` is now protected (samdark)
- Bug #17434: Fixed Internet Explorer 11 AJAX redirect bug in case of 301 and 302 response codes (`XMLHttpRequest: Network Error 0x800c0008`) (kamarton)
- Bug #16531: Fix error in `Response::sendContent()` when `set_time_limit()` is disabled (brandonkelly)
- Bug #17449: Ensure `CHECK` statement goes after `COMMENT` in MySQL `QueryBuilder::addCommentOnColumn()` (Manu311)

7
framework/web/Response.php

@ -430,7 +430,12 @@ class Response extends \yii\base\Response
return;
}
set_time_limit(0); // Reset time limit for big files
if (function_exists('set_time_limit')) {
set_time_limit(0); // Reset time limit for big files
} else {
Yii::warning('set_time_limit() is not available', __METHOD__);
}
$chunkSize = 8 * 1024 * 1024; // 8MB per chunk
if (is_array($this->stream)) {

Loading…
Cancel
Save