Allow numeric topics

Not part of the spec but to prevent a BC break
This commit is contained in:
Chris Boden 2017-12-11 19:21:52 -05:00
parent 309564cbf1
commit d52de66ab0

View File

@ -93,7 +93,7 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
throw new Exception("Invalid WAMP message format");
}
if (isset($json[1]) && !is_string($json[1])) {
if (isset($json[1]) && !(is_string($json[1]) || is_numeric($json[1]))) {
throw new Exception('Invalid Topic, must be a string');
}