mirror of
https://github.com/predis/predis.git
synced 2026-08-17 20:54:28 +00:00
Optimize when a pair of curly brackets for key tagging is missing.
This commit is contained in:
+5
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user