From 385112a66ead8ff171f6ef34175e71986c4de5df Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Tue, 21 Nov 2023 22:47:04 +0100 Subject: [PATCH] Two other warnings for PHP8.3 fixed --- adminer/include/functions.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 537c2768..6565375a 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -1031,7 +1031,7 @@ function input($field, $value, $function) { function process_input($field) { global $adminer, $driver; $idf = bracket_escape($field["field"]); - $function = $_POST["function"][$idf]; + $function = $_POST["function"][$idf] ?? null; $value = $_POST["fields"][$idf]; if ($field["type"] == "enum") { if ($value == -1) { @@ -1508,8 +1508,12 @@ function edit_form($table, $fields, $row, $update) { if (!$_POST["save"] && is_string($value)) { $value = $adminer->editVal($value, $field); } + $fname = null; + if (isset($_POST["function"][$name])) { + $fname = (string)$_POST["function"][$name]; + } $function = ($_POST["save"] - ? (string) $_POST["function"][$name] + ? $fname : ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "now" : ($value === false ? null : ($value !== null ? '' : 'NULL'))