Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong sample: Expecting string in sample code, but int given #33

Open
fugikzl opened this issue May 14, 2023 · 1 comment
Open

Wrong sample: Expecting string in sample code, but int given #33

fugikzl opened this issue May 14, 2023 · 1 comment

Comments

@fugikzl
Copy link

fugikzl commented May 14, 2023

I have tried to launch controller sample and caught that error:
.....\vendor\gotzmann\comet\src\Stream.php:250 >> fwrite(): Argument #2 ($data) must be of type string, int given

It's very dumb, cause the exception accurs because of that line from sample:
$response->getBody()->write(self::$counter);
And can be solved by:
$response->getBody()->write((string)self::$counter);

@fugikzl fugikzl changed the title Expecting string in sample code, but int given Wrong sample: Expecting string in sample code, but int given May 14, 2023
@fugikzl
Copy link
Author

fugikzl commented May 14, 2023

Не знаю, стоило ли создавать новый issue ради этого...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant