diff --git a/ChangeLog b/ChangeLog index dd549dd2e..55808c04a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,8 +6,11 @@ $Id$ $Source$ 2001-11-17 Loïc Chapeaux - * libraries/display_tbl.lib.php3, lines 85-86: fixed bug #482627 - show - full processlist should have 'kill'. + * libraries/display_tbl.lib.php3: + - lines 85-86: fixed bug #482627 - show full processlist should have + 'kill'; + - since php 4.0.5 the associative array returned by "mysql_fetch_array" + may returns fields with NULL value. 2001-11-16 Loïc Chapeaux * tbl_indexes.php3: merged Michal fix. diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 2fece6151..9ab4e3867 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -644,7 +644,8 @@ if (!defined('__LIB_DISPLAY_TBL__')){ for ($i = 0; $i < $fields_cnt; ++$i) { $primary = $fields_meta[$i]; $condition = ' ' . backquote($primary->name) . ' '; - if (!isset($row[$primary->name])) { + if (!isset($row[$primary->name]) + || (function_exists('is_null') && is_null($row[$primary->name]))) { $condition .= 'IS NULL AND'; } else { $condition .= '= \'' . sql_addslashes($row[$primary->name]) . '\' AND'; @@ -754,7 +755,8 @@ if (!defined('__LIB_DISPLAY_TBL__')){ for ($i = 0; $i < $fields_cnt; ++$i) { $primary = $fields_meta[$i]; if ($primary->numeric == 1) { - if (!isset($row[$primary->name])) { + if (!isset($row[$primary->name]) + || (function_exists('is_null') && is_null($row[$primary->name]))) { echo ' NULL' . "\n"; } else if ($row[$i] != '') { echo ' ' . $row[$primary->name] . '' . "\n"; @@ -770,7 +772,8 @@ if (!defined('__LIB_DISPLAY_TBL__')){ if (eregi('BINARY', $field_flags)) { echo ' [BLOB]' . "\n"; } else { - if (!isset($row[$primary->name])) { + if (!isset($row[$primary->name]) + || (function_exists('is_null') && is_null($row[$primary->name]))) { echo ' NULL' . "\n"; } else if ($row[$primary->name] != '') { if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) { @@ -784,7 +787,8 @@ if (!defined('__LIB_DISPLAY_TBL__')){ } } } else { - if (!isset($row[$primary->name])) { + if (!isset($row[$primary->name]) + || (function_exists('is_null') && is_null($row[$primary->name]))) { echo ' NULL' . "\n"; } else if ($row[$primary->name] != '') { // loic1: Cut text/blob fields even if $cfgShowBlob is true