diff --git a/CHANGELOG.md b/CHANGELOG.md index 959d889..102495d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ CHANGELOG ========= -###Legend +### Legend * "BC": Backwards compatibility break (from public component APIs) * "BF": Bug fix diff --git a/src/Ratchet/App.php b/src/Ratchet/App.php index 6c084d9..465f270 100644 --- a/src/Ratchet/App.php +++ b/src/Ratchet/App.php @@ -65,10 +65,6 @@ class App { trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING); } - if (3 !== strlen('✓')) { - throw new \DomainException('Bad encoding, length of unicode character ✓ should be 3. Ensure charset UTF-8 and check ini val mbstring.func_autoload'); - } - if (null === $loop) { $loop = LoopFactory::create(); } diff --git a/src/Ratchet/WebSocket/WsServer.php b/src/Ratchet/WebSocket/WsServer.php index 8ded680..88788b5 100644 --- a/src/Ratchet/WebSocket/WsServer.php +++ b/src/Ratchet/WebSocket/WsServer.php @@ -78,6 +78,10 @@ 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'); + } + $this->delegate = $component; $this->connections = new \SplObjectStorage;