Bug fix + dependency update

This commit is contained in:
Roman Hergenreder 2020-06-24 21:18:26 +02:00
parent 6162eff694
commit 36cee43c74
5 changed files with 11 additions and 16 deletions

@ -49,14 +49,14 @@ class Request {
public function parseParams($values) {
foreach($this->params as $name => $param) {
$value = (isset($values[$name]) ? $values[$name] : NULL);
$value = $values[$name] ?? NULL;
if(!$param->optional && is_null($value)) {
if(!$param->optional && (is_null($value) || empty($value))) {
$this->lastError = 'Missing parameter: ' . $name;
return false;
}
if(!is_null($value)) {
if(!is_null($value) && !empty($value)) {
if(!$param->parseParam($value)) {
$value = print_r($value, true);
$this->lastError = "Invalid Type for parameter: $name '$value' (Required: " . $param->getTypeName() . ")";

@ -68,11 +68,6 @@ abstract class Head extends View {
$this->addJS(Script::BOOTSTRAP);
}
public function loadAdminlte() {
$this->addCSS(Link::ADMINLTE);
$this->addJS(Script::ADMINLTE);
}
public function getCode() {
$header = "<head>";

@ -245,7 +245,7 @@ class User extends ApiObject {
}
public function processVisit() {
if ($this->sql && isset($_COOKIE["PHPSESSID"]) && !empty($_COOKIE["PHPSESSID"])) {
if ($this->sql && $this->sql->isConnected() && isset($_COOKIE["PHPSESSID"]) && !empty($_COOKIE["PHPSESSID"])) {
if ($this->isBot()) {
return;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long