-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
$redis = new Redis;
$redis->connect('127.0.0.1');
// int(0)
var_dump($redis->getDbNum());
// Sends SELECT -1, Redis replies with -ERR invalid DB index.
// This prints false. Could also be done with index = 1000 (which is invalid in Redis).
var_dump($redis->select(-1));
// int(-1)
var_dump($redis->getDbNum());
Clearly the last call should print int(0)
or whatever the original, previously correctly set database index was.
etienne-martin
Metadata
Metadata
Assignees
Labels
No labels