Bug fix + dependency update
This commit is contained in:
parent
6162eff694
commit
36cee43c74
@ -49,14 +49,14 @@ class Request {
|
|||||||
|
|
||||||
public function parseParams($values) {
|
public function parseParams($values) {
|
||||||
foreach($this->params as $name => $param) {
|
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;
|
$this->lastError = 'Missing parameter: ' . $name;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_null($value)) {
|
if(!is_null($value) && !empty($value)) {
|
||||||
if(!$param->parseParam($value)) {
|
if(!$param->parseParam($value)) {
|
||||||
$value = print_r($value, true);
|
$value = print_r($value, true);
|
||||||
$this->lastError = "Invalid Type for parameter: $name '$value' (Required: " . $param->getTypeName() . ")";
|
$this->lastError = "Invalid Type for parameter: $name '$value' (Required: " . $param->getTypeName() . ")";
|
||||||
|
@ -68,11 +68,6 @@ abstract class Head extends View {
|
|||||||
$this->addJS(Script::BOOTSTRAP);
|
$this->addJS(Script::BOOTSTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadAdminlte() {
|
|
||||||
$this->addCSS(Link::ADMINLTE);
|
|
||||||
$this->addJS(Script::ADMINLTE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCode() {
|
public function getCode() {
|
||||||
$header = "<head>";
|
$header = "<head>";
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ class User extends ApiObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function processVisit() {
|
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()) {
|
if ($this->isBot()) {
|
||||||
return;
|
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