diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 469a23773d..69bcec2bd8 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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 ------------------------- diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index 81a20f0a3c..393438ede5 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -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') {