this is wrong, it overrode previous commit, 

```
if (!$version) {
     $version = '[unknown]';
```
is correct. There is no $res and $dbVersion variables. Will output warning in upgrade process