From 65fd673d05cb5b4c05efb1cc1330190247c15952 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 29 Mar 2025 23:41:33 +0100 Subject: [PATCH] Remove ignored errors --- adminer/select.inc.php | 2 +- phpstan.neon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index b920cd7f..0a11ddf9 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -398,7 +398,7 @@ if (!$columns && support("table")) { foreach ($unique_array as $key => $val) { if ((JUSH == "sql" || JUSH == "pgsql") && preg_match('~char|text|enum|set~', $fields[$key]["type"]) && strlen($val) > 64) { $key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions - $key = "MD5(" . (JUSH != 'sql' || preg_match("~^utf8~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")"; + $key = "MD5(" . (JUSH != 'sql' || preg_match("~^utf8~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset(connection()) . ")") . ")"; $val = md5($val); } $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key)); diff --git a/phpstan.neon b/phpstan.neon index 5b3051a4..c50e9f67 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,7 +12,7 @@ parameters: - identifier: includeOnce.fileNotFound # ./adminer-plugins.php - "~^Function (set_magic_quotes_runtime|mysql_)~" # PHP < 7 functions - "~an unknown class OCI-?Lob~" # this looks like PHPStan bug - - "~^Variable \\$(adminer|connection|driver|error|translations) might not be defined~" # declared in bootstrap.inc.php + - "~^Variable \\$error might not be defined~" # declared in bootstrap.inc.php - "~^Constant LANG not found~" # defined in lang.inc.php - "~expects int, float given~" # this will work - "~expects bool~" # truthy values