Improve performance of handling ErrorHandler::$memoryReserveSize

This commit is contained in:
Robert Korulczyk
2023-10-23 20:49:27 +02:00
parent c9ac82d85d
commit 2141f9abdf
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Yii Framework 2 Change Log
- Bug #19927: Fixed `console\controllers\MessageController` when saving translations to database: fixed FK error when adding new string and language at the same time, checking/regenerating all missing messages and dropping messages for unused languages (atrandafir)
- Bug #20002: Fixed superfluous query on HEAD request in serializer (xicond)
- Enh #12743: Added new methods `BaseActiveRecord::loadRelations()` and `BaseActiveRecord::loadRelationsFor()` to eager load related models for existing primary model instances (PowerGamer1)
- Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006)
2.0.49.2 October 12, 2023
-------------------------

View File

@ -94,7 +94,7 @@ abstract class ErrorHandler extends Component
set_error_handler([$this, 'handleError']);
}
if ($this->memoryReserveSize > 0) {
$this->_memoryReserve = str_pad('', $this->memoryReserveSize, 'x');
$this->_memoryReserve = str_repeat('x', $this->memoryReserveSize);
}
// to restore working directory in shutdown handler
if (PHP_SAPI !== 'cli') {