Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M. Turek <me@derrabus.de>2005-04-01 02:28:04 +0400
committerAlexander M. Turek <me@derrabus.de>2005-04-01 02:28:04 +0400
commit0cddbb2cd42e38c0b28cb2757f3fa4b2ab332455 (patch)
tree7a775ee72e0be6ef38b90a2175bc076912f8e4b1
parent8ddcb6d302cd67140953fde166378240af2600e3 (diff)
bug #1174045
-rwxr-xr-xChangeLog3
-rw-r--r--left.php12
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a3ef531df6..f14c924058 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
+2005-03-31 Alexander M. Turek <me@derrabus.de>
+ * left.php: Undefined offset (Bug #1174045).
+
2005-03-31 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: added FAQ 5.17 about problem with
Firefox when the Tabbrowser Extensions plugin is installed
diff --git a/left.php b/left.php
index 8b30bdd3e5..73a6b8e80e 100644
--- a/left.php
+++ b/left.php
@@ -451,6 +451,14 @@ if ($num_dbs > 1) {
if (!empty($db_start) && $db == $db_start) {
$selected_db = $j;
}
+ /**
+ * The query below will return a result set with a single field under
+ * MySQL versions before 5.0 and one with two fields under MySQL 5.0
+ * and above. The MySQL 5 result set also includes the table type
+ * ('BASE TABLE', 'VIEW' or 'TEMPORARY').
+ * MySQL 4 does neither know about views nor differ between permanent
+ * and temporary tables, so the table type is irrelevant here.
+ */
$tables = PMA_DBI_try_query('SHOW ' . (PMA_MYSQL_INT_VERSION >= 50000 ? 'FULL ' : '') . 'TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE);
$num_tables = ($tables) ? @PMA_DBI_num_rows($tables) : 0;
$common_url_query = PMA_generate_common_url($db);
@@ -518,7 +526,7 @@ if ($num_dbs > 1) {
$tablestack = array();
$table_array = array();
$table_types = array();
- while (list($table, $type) = PMA_DBI_fetch_row($tables)) {
+ while (@list($table, $type) = PMA_DBI_fetch_row($tables)) {
$table_item = (!empty($tooltip_name) && isset($tooltip_name[$table]) && !empty($tooltip_name[$table]) && $cfg['ShowTooltipAliasTB'] && strtolower($cfg['ShowTooltipAliasTB']) !== 'nested'
? htmlspecialchars($tooltip_name[$table])
: htmlspecialchars($table));
@@ -596,7 +604,7 @@ if ($num_dbs > 1) {
$table_array = array();
// Gets the list of tables from the current database
$book_sql_cache = PMA_queryDBBookmarks($db, $cfg['Bookmark'], $table_array);
- while (list($table, $type) = PMA_DBI_fetch_row($tables)) {
+ while (@list($table, $type) = PMA_DBI_fetch_row($tables)) {
$table_array[$table] = '';
$url_title = (!empty($tooltip) && isset($tooltip[$table]))
? htmlspecialchars($tooltip[$table])