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

Getting error on production - strpos(): Passing null to parameter #1036

Open
nicolasvahidzein opened this issue Aug 20, 2023 · 1 comment
Open

Comments

@nicolasvahidzein
Copy link

[2023-08-19 06:18:06] production.WARNING: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php on line 88

This is on a Laravel installation. Any ideas please?

@nicolasvahidzein
Copy link
Author

    public function handleConnect($conn) {
        $conn->decor = new IoConnection($conn);
        $conn->decor->resourceId = (int)$conn->stream;

        $uri = $conn->getRemoteAddress();
        $conn->decor->remoteAddress = trim(
THIS LINE HERE ======>>>>>>>>      parse_url((strpos($uri, '://') === false ? 'tcp://' : '') . $uri, PHP_URL_HOST),
            '[]'
        );

        $this->app->onOpen($conn->decor);

        $conn->on('data', function ($data) use ($conn) {
            $this->handleData($data, $conn);
        });
        $conn->on('close', function () use ($conn) {
            $this->handleEnd($conn);
        });
        $conn->on('error', function (\Exception $e) use ($conn) {
            $this->handleError($e, $conn);
        });
    }

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