diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index 2cf1efa0..7222fe5b 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -191,7 +191,7 @@ abstract class SqlDriver { } /** Convert value returned by database to actual value - * @param Field $field + * @param array{type: string} $field */ function value(?string $val, array $field): ?string { return (method_exists($this->conn, 'value') ? $this->conn->value($val, $field) : $val); diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 0df5a44d..f605d74d 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -808,7 +808,7 @@ function select_value($val, string $link, array $field, ?string $text_length): s $link = $val; // IE 11 and all modern browsers hide referrer } } - $return = adminer()->editVal($val, $field); + $return = adminer()->editVal(driver()->value($val, $field), $field); if ($return !== null) { if (!is_utf8($return)) { $return = "\0"; // htmlspecialchars of binary data returns an empty string diff --git a/adminer/select.inc.php b/adminer/select.inc.php index bf40ddb9..6041f49d 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -414,7 +414,6 @@ if (!$columns && support("table")) { if (isset($names[$key])) { $column = current($select); $field = (array) $fields[$key]; - $val = driver()->value($val, $field); if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) { $email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages }