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

@ -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') {