diff --git a/phpstan.neon b/phpstan.neon index df7b6bb9..a4d7874b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -48,7 +48,7 @@ parameters: # ignore errores with ignoreErrors: # this is ignored for now - - '#Expression in empty\(\) is always falsy.#' + # - '#Expression in empty\(\) is always falsy.#' # - # message: '#Reflection error: [a-zA-Z0-9\\_]+ not found.#' # path: www/includes/edit_base.php diff --git a/www/lib/CoreLibs/ACL/Login.php b/www/lib/CoreLibs/ACL/Login.php index 87a48ba1..deb8b58c 100644 --- a/www/lib/CoreLibs/ACL/Login.php +++ b/www/lib/CoreLibs/ACL/Login.php @@ -191,7 +191,8 @@ class Login extends \CoreLibs\DB\IO exit; } - // set global is ajax page for if we show the data directly, or need to pass it back + // set global is ajax page for if we show the data directly, + // or need to pass it back // to the continue AJAX class for output back to the user $this->login_is_ajax_page = isset($GLOBALS['AJAX_PAGE']) && $GLOBALS['AJAX_PAGE'] ? true : false; // set the default lang @@ -207,6 +208,7 @@ class Login extends \CoreLibs\DB\IO // check what schema to use. if there is a login schema use this, else check // if there is a schema set in the config, or fall back to DB_SCHEMA // if this exists, if this also does not exists use public schema + /** @phpstan-ignore-next-line */ if (defined('LOGIN_DB_SCHEMA') && !empty(LOGIN_DB_SCHEMA)) { $SCHEMA = LOGIN_DB_SCHEMA; } elseif (isset($db_config['db_schema']) && $db_config['db_schema']) { @@ -216,6 +218,7 @@ class Login extends \CoreLibs\DB\IO } else { $SCHEMA = 'public'; } + // echo "

*****SCHEMA******

: $SCHEMA
"; // set schema if schema differs to schema set in db conneciton if ($this->dbGetSchema() && $this->dbGetSchema() != $SCHEMA) { $this->dbExec("SET search_path TO " . $SCHEMA); diff --git a/www/lib/CoreLibs/Admin/Backend.php b/www/lib/CoreLibs/Admin/Backend.php index b4c3b782..270873de 100644 --- a/www/lib/CoreLibs/Admin/Backend.php +++ b/www/lib/CoreLibs/Admin/Backend.php @@ -208,6 +208,7 @@ class Backend extends \CoreLibs\DB\IO // check schema $SCHEMA = 'public'; + /** @phpstan-ignore-next-line */ if (defined('LOGIN_DB_SCHEMA') && !empty(LOGIN_DB_SCHEMA)) { $SCHEMA = LOGIN_DB_SCHEMA; } elseif ($this->dbGetSchema()) { @@ -511,6 +512,7 @@ class Backend extends \CoreLibs\DB\IO string $associate = null, string $file = null ): void { + /** @phpstan-ignore-next-line */ if (defined('GLOBAL_DB_SCHEMA') && !empty(GLOBAL_DB_SCHEMA)) { $SCHEMA = GLOBAL_DB_SCHEMA; } elseif ($this->dbGetSchema()) {