Skip to content

Commit

Permalink
[6.x] Use isset but not !empty for changing redis database (#30420)
Browse files Browse the repository at this point in the history
* Update PhpRedisConnector.php

* Fixed syntax
  • Loading branch information
davidhhuan authored and taylorotwell committed Oct 27, 2019
1 parent 69f9fa4 commit 12b8a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Redis/Connectors/PhpRedisConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ protected function createClient(array $config)
$client->auth($config['password']);
}

if (! empty($config['database'])) {
$client->select($config['database']);
if (isset($config['database'])) {
$client->select((int) $config['database']);
}

if (! empty($config['prefix'])) {
Expand Down

0 comments on commit 12b8a6a

Please sign in to comment.