1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 19:13:59 +02:00

Notices: Avoid accessing offset on null

Thanks to @peterpp at 62017e3.
This commit is contained in:
Jakub Vrana
2025-03-26 04:16:17 +01:00
parent d3be21e000
commit 1b8a428d2f
16 changed files with 37 additions and 27 deletions

View File

@@ -33,8 +33,8 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
ksort($index["columns"]);
foreach ($index["columns"] as $key => $column) {
if ($column != "") {
$length = $index["lengths"][$key];
$desc = $index["descs"][$key];
$length = idx($index["lengths"], $key);
$desc = idx($index["descs"], $key);
$set[] = idf_escape($column) . ($length ? "(" . (+$length) . ")" : "") . ($desc ? " DESC" : "");
$columns[] = $column;
$lengths[] = ($length ?: null);