From bbced3b7657e16254ce1af1a689b7aed3af55475 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Sat, 27 Feb 2016 13:02:56 -0500 Subject: [PATCH] Fixed frame creation type bug --- src/Ratchet/WebSocket/WsConnection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ratchet/WebSocket/WsConnection.php b/src/Ratchet/WebSocket/WsConnection.php index 4082fa9..3c34c9f 100644 --- a/src/Ratchet/WebSocket/WsConnection.php +++ b/src/Ratchet/WebSocket/WsConnection.php @@ -15,7 +15,7 @@ class WsConnection extends AbstractConnectionDecorator { public function send($msg, $isBinary = false) { if (!$this->WebSocket->closing) { if (!($msg instanceof DataInterface)) { - $msg = new Frame($msg, true, ((boolean)$isBinary ? Frame::OP_TEXT : Frame::OP_BINARY)); + $msg = new Frame($msg, true, ((boolean)$isBinary ? Frame::OP_BINARY : Frame::OP_TEXT)); } $this->getConnection()->send($msg->getContents());