From 259d384bcf347ca51792e2961d2ec74ff5e6d8b3 Mon Sep 17 00:00:00 2001 From: Ben Connito Date: Mon, 8 Jun 2015 09:29:21 -0400 Subject: [PATCH] if a CURIE prefix has not been defined, do not convert the URI from CURIE to URI. per @attozk comment --- src/Ratchet/Wamp/WampConnection.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Ratchet/Wamp/WampConnection.php b/src/Ratchet/Wamp/WampConnection.php index 64590a0..3b8f93e 100644 --- a/src/Ratchet/Wamp/WampConnection.php +++ b/src/Ratchet/Wamp/WampConnection.php @@ -82,14 +82,12 @@ class WampConnection extends AbstractConnectionDecorator { */ public function getUri($uri) { $curieSeperator = ':'; - $fullSeperator = '#'; if (preg_match('/http(s*)\:\/\//', $uri) == false) { - if (strpos($uri, $curieSeperator) !== false) { + if (strpos($uri, $curieSeperator) !== false && isset($this->WAMP->prefixes[$prefix]) === true) { list($prefix, $action) = explode($curieSeperator, $uri); - $expandedPrefix = isset($this->WAMP->prefixes[$prefix]) ? $this->WAMP->prefixes[$prefix] : $prefix; - return $expandedPrefix . $fullSeperator . $action; + return $this->WAMP->prefixes[$prefix] . '#' . $action; } }