From 56f425ea306ddc6ba449c099208907bcb4e4a44f Mon Sep 17 00:00:00 2001 From: NReib <120319811+NReib@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:02:19 +0100 Subject: [PATCH] check if "val-" exists in enum value Some enum values seem to not be prefixed with "val-" leading to SQL Errors on insertion --- adminer/include/html.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adminer/include/html.inc.php b/adminer/include/html.inc.php index 6e633ab7f..35bd78b27 100644 --- a/adminer/include/html.inc.php +++ b/adminer/include/html.inc.php @@ -317,7 +317,9 @@ function process_input(array $field) { if ($value == "null") { return "NULL"; } - $value = substr($value, 4); // 4 - strlen("val-") + if (preg_match('~val-~', $value)) { + $value = substr($value, 4); // 4 - strlen("val-") + } } if ($field["auto_increment"] && $value == "") { return null;