We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b331cf2 commit 6e02758Copy full SHA for 6e02758
src/WebSocketServer.php
@@ -216,7 +216,9 @@ private function messagesWorker(array $readSocks)
216
continue;
217
}
218
219
- if (method_exists($this->handler, self::MAP_EVENT_TYPE_TO_METHODS[$dataType])) {
+ $isSupportedMethod = empty(self::MAP_EVENT_TYPE_TO_METHODS[$dataType]) === false
220
+ && method_exists($this->handler, self::MAP_EVENT_TYPE_TO_METHODS[$dataType]);
221
+ if ($isSupportedMethod) {
222
try {
223
// dynamic call: onMessage, onPing, onPong
224
$this->handler->{self::MAP_EVENT_TYPE_TO_METHODS[$dataType]}($this->cureentConn, $dataPayload);
0 commit comments