Bug fix + dependency update
This commit is contained in:
parent
6162eff694
commit
36cee43c74
@ -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;
|
||||
|
8
css/bootstrap.min.css
vendored
8
css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
6
js/bootstrap.bundle.min.js
vendored
6
js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user