Bug #94422
closedwrong handling in TYPO3\CMS\Core\Http\SelfEmittableLazyOpenStream
100%
Description
The class SelfEmittableLazyOpenStream has one issue like reported in the comments here https://forge.typo3.org/issues/91826 but furthermore another one.
In bug 91826 I mention the context and won't repeat it here.
Here is the additional bug:
The method write($string) is not according to the interface Psr\Http\Message\StreamInterface and must return int.
Therefore it must not throw any exception. As the class is used for Ajax requests exceptions are not shown and make debugging quite hard anyway.
Having tried to return just 0 I never got the installtool running like expected.
Returning just strlen($string) instead worked so far that the install-process finished by writing in LocalConfiguration.php and the backend could be opened.
I don't know which string is coming in, if it could include multi-byte-signs and therefore return a wrong strlen.
Also I never verified the usage of the returned value.
Therefore my solution is a workaround for my own case but it has to be verified if it could be used in general.