From ddec2cb313f1cba3a31e8c8ea230dfa0a73dba2f Mon Sep 17 00:00:00 2001 From: Ben Connito Date: Mon, 8 Jun 2015 09:49:36 -0400 Subject: [PATCH] oops! fix using $prefix before it was defined. --- src/Ratchet/Wamp/WampConnection.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Ratchet/Wamp/WampConnection.php b/src/Ratchet/Wamp/WampConnection.php index 3b8f93e..dda1e4e 100644 --- a/src/Ratchet/Wamp/WampConnection.php +++ b/src/Ratchet/Wamp/WampConnection.php @@ -84,10 +84,12 @@ class WampConnection extends AbstractConnectionDecorator { $curieSeperator = ':'; if (preg_match('/http(s*)\:\/\//', $uri) == false) { - if (strpos($uri, $curieSeperator) !== false && isset($this->WAMP->prefixes[$prefix]) === true) { + if (strpos($uri, $curieSeperator) !== false) { list($prefix, $action) = explode($curieSeperator, $uri); - - return $this->WAMP->prefixes[$prefix] . '#' . $action; + + if(isset($this->WAMP->prefixes[$prefix]) === true){ + return $this->WAMP->prefixes[$prefix] . '#' . $action; + } } }