diff --git a/ChangeLog b/ChangeLog index 699801729..c05bb96b3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $Source$ * main.php3: removed an other display of the socket used and the port used if the 'verbose' setting exists for a server. * lang/italian.inc.php3: updated thanks to Pietro Danesi. + * left.php3: fixed a bug with php < 4.0.6 (mysql_fetch_array did not return + fields with NULL value). 2001-10-28 Loïc Chapeaux * main.php3: diff --git a/left.php3 b/left.php3 index f2c35bdd8..5b5f59f21 100755 --- a/left.php3 +++ b/left.php3 @@ -192,7 +192,8 @@ if ($num_dbs > 1) { $tooltip = array(); $result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db)); while ($tmp = mysql_fetch_array($result)) { - $tooltip[$tmp['Name']] = rtrim($tmp['Comment'] . ' (' . $tmp['Rows'] . ' ' . $strRows . ')'); + $tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '') + . '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')'; } // end while } // end if @@ -277,7 +278,8 @@ else if ($num_dbs == 1) { $tooltip = array(); $result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db)); while ($tmp = mysql_fetch_array($result)) { - $tooltip[$tmp['Name']] = rtrim($tmp['Comment'] . ' (' . $tmp['Rows'] . ' ' . $strRows . ')'); + $tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '') + . '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')'; } // end while } // end if