Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2021-06-09 19:06:46 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2021-06-09 19:07:40 +0300
commit6989d615a5eb948733b93f960c38d4305b7c6deb (patch)
treeecc92e1123ffd6a905858ccd10acdc616a3398d7 /libraries/classes/Config
parent7d8b9a48a9b432a034f4f2f08c13345a16899263 (diff)
Fix some errors found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'libraries/classes/Config')
-rw-r--r--libraries/classes/Config/Validator.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/libraries/classes/Config/Validator.php b/libraries/classes/Config/Validator.php
index 9c0f57a568..91df1e346b 100644
--- a/libraries/classes/Config/Validator.php
+++ b/libraries/classes/Config/Validator.php
@@ -165,6 +165,7 @@ class Validator
foreach ((array) $validators[$vid] as $validator) {
$vdef = (array) $validator;
$vname = array_shift($vdef);
+ /** @var callable $vname */
$vname = 'PhpMyAdmin\Config\Validator::' . $vname;
$args = array_merge([$vid, &$arguments], $vdef);
$r = call_user_func_array($vname, $args);
@@ -237,7 +238,7 @@ class Validator
error_clear_last();
$socket = empty($socket) ? null : $socket;
- $port = empty($port) ? null : $port;
+ $port = empty($port) ? null : (int) $port;
mysqli_report(MYSQLI_REPORT_OFF);
@@ -330,7 +331,7 @@ class Validator
'Server'
);
- if ($test !== true) {
+ if (is_array($test)) {
$result = array_merge($result, $test);
}
}
@@ -387,7 +388,7 @@ class Validator
empty($values['Servers/1/controlpass']) ? '' : $values['Servers/1/controlpass'],
'Server_pmadb'
);
- if ($test !== true) {
+ if (is_array($test)) {
$result = array_merge($result, $test);
}
}