diff --git a/lib/Predis.php b/lib/Predis.php index ef3b7ac7..30e72e13 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -439,9 +439,11 @@ abstract class Command { $key = $this->_arguments[0]; $start = strpos($key, '{'); - $end = strpos($key, '}'); - if ($start !== false && $end !== false) { - $key = substr($key, ++$start, $end - $start); + if ($start !== false) { + $end = strpos($key, '}'); + if ($end !== false) { + $key = substr($key, ++$start, $end - $start); + } } $this->_hash = $distributor->generateKey($key);