fixed implode arguments & .gitignore for phpstorm#972
Conversation
|
Not shipping this - I think the code is fine - please provide steps to reproduce the error if this is mistaken.
|
|
Hi there, public function finalize(): void
{
$this -> buffer = null;
}this method is public. it puts null to buffer. everybody can call it. php > implode(null);
PHP Warning: Uncaught TypeError: implode(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given in php shell code:1
Stack trace:
#0 php shell code(1): implode()
#1 {main}
thrown in php shell code on line 1
Another minor detail is, that buffer is declared as an array in class: /**
* @var array $buffer
* Buffer of accumilated data.
*/
private $buffer;which is obviously not true, because practically it can be null under certain circumstances |
|
Oh yep, definitely could still be a bug there. Thanks for the explanation. That should be enough information for me to confirm/fix. Re-opening this so it doesn't get lost. |
i've tried to use DummyPrintConnector, but faced with error in implode function