Skip to content

Commit 8c7bfcf

Browse files
tessuserikdubbelboer
authored andcommitted
minor changes (#156)
* change order of evaluation PHP evaluates conditions from left to right count needs more instructions thus should be on the right side (probably not necessary, but I'm a perf guy...) * set a default in case it is not set in confg (to avoid PHP warnings)
1 parent c291de3 commit 8c7bfcf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

includes/common.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
$config['hideEmptyDBs'] = false;
116116
}
117117

118+
if (!isset($config['showEmptyNamespaceAsKey'])) {
119+
$config['showEmptyNamespaceAsKey'] = false;
120+
}
121+
118122
// Setup a connection to Redis.
119123
if(isset($server['scheme']) && $server['scheme'] === 'unix' && $server['path']) {
120124
$redis = new Predis\Client(array('scheme' => 'unix', 'path' => $server['path']));

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
$key = explode($server['seperator'], $key);
37-
if ($key[count($key) - 1] == '' && $config['showEmptyNamespaceAsKey']) {
37+
if ($config['showEmptyNamespaceAsKey'] && $key[count($key) - 1] == '') {
3838
array_pop($key);
3939
$key[count($key) - 1] .= ':';
4040
}

0 commit comments

Comments
 (0)