Bug fixes for not initialized array calls

This commit is contained in:
Clemens Schwaighofer
2020-05-29 06:30:53 +09:00
parent f694539a0b
commit a311552c56
3 changed files with 3 additions and 3 deletions

View File

@@ -597,7 +597,7 @@ class Login extends \CoreLibs\DB\IO
// unset mem limit if debug is set to 1
// if (($GLOBALS["DEBUG_ALL"] || $GLOBALS["DB_DEBUG"] || $_SESSION["DEBUG_ALL"] || $_SESSION["DB_DEBUG"]) && ini_get('memory_limit') != -1)
// ini_set('memory_limit', -1);
if ($res['filename'] == $this->page_name) {
if (isset($res['filename']) && $res['filename'] == $this->page_name) {
$this->permission_okay = true;
} else {
$this->login_error = 103;

View File

@@ -311,7 +311,7 @@ class PgSQL
$q .= "AND indisprimary";
$cursor = $this->__dbQuery($q);
if ($cursor) {
return $this->__dbFetchArray($cursor)['column_name'];
return $this->__dbFetchArray($cursor)['column_name'] ?? false;
} else {
return false;
}

View File

@@ -1646,7 +1646,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
// data part, read from where [POST]
// radio group selections (only one can be active)
if ($data_array['type'] == 'radio_group') {
if ($i == $_POST[$prfx.$el_name]) {
if (isset($_POST[$prfx.$el_name]) && $i == $_POST[$prfx.$el_name]) {
$_value = $i + 1;
} else {
$_value = 'NULL';