1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 10:04:07 +02:00

PHPStan: Fix level 5 errors

This commit is contained in:
Jakub Vrana
2025-03-26 19:29:50 +01:00
parent c78299a3f6
commit c96894ecd4
9 changed files with 34 additions and 26 deletions

View File

@@ -48,7 +48,7 @@ if ($_GET["val"] && is_ajax()) {
$where[] = where_check($unique_idf, $fields);
$return = $driver->select($TABLE, $select, $where, $select);
if ($return) {
echo reset($return->fetch_row());
echo first($return->fetch_row());
}
}
exit;
@@ -170,7 +170,7 @@ if ($_POST && !$error) {
foreach ($_POST["val"] as $unique_idf => $row) {
$set = array();
foreach ($row as $key => $val) {
$key = bracket_escape($key, 1); // 1 - back
$key = bracket_escape($key, true); // true - back
$set[idf_escape($key)] = (preg_match('~char|text~', $fields[$key]["type"]) || $val != "" ? $adminer->processInput($fields[$key], $val) : "NULL");
}
$result = $driver->update(