From 1e6750cbc9e91645407f7e4b4dd0e4187202b38d Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 7 May 2015 07:51:16 +0530 Subject: [PATCH] bug #4892 Undefined variable: unique_conditions Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/DisplayResults.class.php | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5447ba7cf9..c9ad2db10a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.4.6.0 (not yet released) - bug #4890 webkitStorageInfo and webkitIndexedDB is deprecated +- bug #4892 Undefined variable: unique_conditions 4.4.5.0 (2015-05-05) - bug Table overhead stats: missing space before the unit diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 217fd784f8..c6ac22c894 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2839,7 +2839,7 @@ class PMA_DisplayResults $row_info = $this->_getRowInfoForSpecialLinks($row, $col_order); - $previousMetaOrgTable = ''; + $uniqueConditionMap = array(); $columnCount = $this->__get('fields_cnt'); for ($currentColumn = 0; @@ -2993,8 +2993,7 @@ class PMA_DisplayResults * costly and does not need to be called if we already know * the conditions for the current table. */ - - if ($meta->orgtable != $previousMetaOrgTable) { + if (! isset($uniqueConditionMap[$meta->orgtable])) { $unique_conditions = PMA_Util::getUniqueCondition( $dt_result, $this->__get('fields_cnt'), @@ -3003,13 +3002,13 @@ class PMA_DisplayResults false, $meta->orgtable ); - $previousMetaOrgTable = $meta->orgtable; + $uniqueConditionMap[$meta->orgtable] = $unique_conditions; } $transform_url_params = array( 'db' => $this->__get('db'), 'table' => $meta->orgtable, - 'where_clause' => $unique_conditions[0], + 'where_clause' => $uniqueConditionMap[$meta->orgtable][0], 'transform_key' => $meta->orgname );