From d52de66ab0d8025494d5747a3b4af6672726860b Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Mon, 11 Dec 2017 19:21:52 -0500 Subject: [PATCH] Allow numeric topics Not part of the spec but to prevent a BC break --- src/Ratchet/Wamp/ServerProtocol.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ratchet/Wamp/ServerProtocol.php b/src/Ratchet/Wamp/ServerProtocol.php index 97fa868..2d6d799 100644 --- a/src/Ratchet/Wamp/ServerProtocol.php +++ b/src/Ratchet/Wamp/ServerProtocol.php @@ -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'); }