From a83626c8af0428d2b35dab481fff7e569a6f47b4 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 10 Apr 2025 17:58:15 +0200 Subject: [PATCH] Fix import without primary key (fix #1017, regression from 5.1.1) --- CHANGELOG.md | 1 + adminer/select.inc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ad0f8c..6d645e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Adminer dev - Fix search anywhere (bug #1004, regression from 5.1.1) +- Fix import without primary key (bug #1017, regression from 5.1.1) ## Adminer 5.2.0 (released 2025-04-08) - Autocomplete SQL commands diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 84077661..46f53605 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -54,7 +54,7 @@ if ($_GET["val"] && is_ajax()) { exit; } -$primary = $unselected = null; +$primary = $unselected = array(); foreach ($indexes as $index) { if ($index["type"] == "PRIMARY") { $primary = array_flip($index["columns"]);