PHP Notice: Uninitialized string offset: 0 RequestVerifier.php on line 56
https://github.com/ratchetphp/RFC6455/blob/859d95f85dda0912c6d5b936d036d044e3af47ef/src/Handshake/RequestVerifier.php#L55
PHP Notice: Uninitialized string offset: 0 in /var/www/domain.app/vendor/ratchet/rfc6455/src/Handshake/RequestVerifier.php on line 56
@essam-art Thanks for reporting. Can you provide some instructions how we can reproduce this?
It's my understanding the specific line would only report an error if trying to validate a request that has an empty request URI. In this case, it's known to be invalid as per the HTTP specs and it appears unlikely it would make it to your backend server anyway.
In either case, we probably want to fix this to not report a notice. PRs with tests welcome 👍
Hi again @clue Thank u for answered , The bug tried to fix the problem by modifying this, but I do not think it has finished. When sending a message via the socket, the connection is not closed, of course, but rather it is in a state such as idle. Even if you try to connect, it is of no use unless you restart the service and the error appears as in the picture.
PHP 7.4
`public function verifyRequestURI($val) { if (!is_string($val) || $val === '' || $val[0] !== '/') { return false; }
if (false !== strstr($val, '#')) {
return false;
}
if (!extension_loaded('mbstring')) {
return true;
}
return mb_check_encoding($val, 'US-ASCII');
}`