Ivan - Fix installation with session-prefix

This commit is contained in:
ivan 2017-06-24 20:00:50 -03:00
parent 33b843352b
commit 4876304f63
1 changed files with 5 additions and 1 deletions
server/libs

View File

@ -2,6 +2,8 @@
require_once 'libs/Validator.php';
require_once 'models/Session.php';
use RedBeanPHP\Facade as RedBean;
abstract class Controller {
private static $dataRequester;
@ -14,7 +16,9 @@ abstract class Controller {
public function getHandler() {
return function () {
try {
Session::getInstance()->setSessionPrefix(Setting::getSetting('session-prefix')->getValue());
if(RedBean::testConnection() && !Setting::isTableEmpty()) {
Session::getInstance()->setSessionPrefix(Setting::getSetting('session-prefix')->getValue());
}
$this->validate();
$this->handler();
} catch (\Exception $exception) {