From 4183f73548c31e60808b302a3f6eddd1ce3122a8 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 10 Jan 2014 20:42:01 -0800 Subject: [PATCH] Don't link NULL foreign key values --- adminer/select.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 1a070e1a..2f1965e4 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -370,7 +370,7 @@ if (!$columns && support("table")) { if (preg_match('~blob|bytea|raw|file~', $field["type"]) && $val != "") { $link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf; } - if (!$link) { // link related items + if (!$link && $val !== null) { // link related items foreach ((array) $foreign_keys[$key] as $foreign_key) { if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) { $link = ""; diff --git a/changes.txt b/changes.txt index 683cc907..cc4f9acb 100644 --- a/changes.txt +++ b/changes.txt @@ -3,6 +3,7 @@ Fix compiled version of Elasticsearch Don't use type=number if a SQL function is used Disable highlighting in textareas with long texts Don't autofocus SQL textarea in Firefox +Don't link NULL foreign key values MongoDB: Count tables, display ObjectIds, sort, limit, offset, count rows Elasticsearch: Create and drop DB, drop table