From 2594ebced4a97aa2dd698437ed251043e76ec61c Mon Sep 17 00:00:00 2001
From: Chris Boden <cboden@gmail.com>
Date: Sun, 10 Sep 2017 12:49:48 -0400
Subject: [PATCH] Fix UTF-8 check

---
 src/Ratchet/WebSocket/WsServer.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Ratchet/WebSocket/WsServer.php b/src/Ratchet/WebSocket/WsServer.php
index 88788b5..8030604 100644
--- a/src/Ratchet/WebSocket/WsServer.php
+++ b/src/Ratchet/WebSocket/WsServer.php
@@ -78,8 +78,8 @@ class WsServer implements HttpServerInterface {
             throw new \UnexpectedValueException('Expected instance of \Ratchet\WebSocket\MessageComponentInterface or \Ratchet\MessageComponentInterface');
         }
 
-        if (bin2hex('✓') === 'e29c93') {
-            throw new \DomainException('Bad encoding, length of unicode character ✓ should be 3. Ensure charset UTF-8 and check ini val mbstring.func_autoload');
+        if (bin2hex('✓') !== 'e29c93') {
+            throw new \DomainException('Bad encoding, unicode character ✓ did not match expected value. Ensure charset UTF-8 and check ini val mbstring.func_autoload');
         }
 
         $this->delegate    = $component;