From 1c379d2e257869e92b12ad42db3b269929c61753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 12 Oct 2001 08:41:15 +0000 Subject: [PATCH] Fixed lots of warnings reported by Steve in tbl_qbe.php3 --- ChangeLog | 1 + tbl_qbe.php3 | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 929253c36..749b42d87 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ $Source$ thanks to Ignacio Vazquez-Abrams . * config.inc.php3, line 50: changed the comment line for the "only_db" setting. + * tbl_qbe.php3: fixed lots of warnings reported by Steve. 2001-10-09 Loïc Chapeaux * user_details.php3, lines 1232-1245 & 1254: fixed some bugs with modifying diff --git a/tbl_qbe.php3 b/tbl_qbe.php3 index 410e96909..e911dd811 100755 --- a/tbl_qbe.php3 +++ b/tbl_qbe.php3 @@ -161,7 +161,7 @@ mysql_free_result($tbl_result); @@ -236,7 +236,7 @@ for ($x = 0; $x < $col; $x++) { } // end if echo "\n"; - if (isset($DelCol[$x]) && $DelCol[$x] == 'on') { + if (!empty($DelCol) && isset($DelCol[$x]) && $DelCol[$x] == 'on') { continue; } ?> @@ -279,7 +279,7 @@ for ($x = 0; $x < $col; $x++) { @@ -289,7 +289,7 @@ for ($x = 0; $x < $col; $x++) { } // end if echo "\n"; - if (isset($DelCol[$x]) && $DelCol[$x] == 'on') { + if (!empty($DelCol) && isset($DelCol[$x]) && $DelCol[$x] == 'on') { continue; } if (isset($Show[$x])) { @@ -317,7 +317,7 @@ for ($x = 0; $x < $col; $x++) { @@ -327,7 +327,7 @@ for ($x = 0; $x < $col; $x++) { } // end if echo "\n"; - if (isset($DelCol[$x]) && $DelCol[$x] == 'on') { + if (!empty($DelCol) && isset($DelCol[$x]) && $DelCol[$x] == 'on') { continue; } if (isset($Criteria[$x])) { @@ -337,7 +337,7 @@ for ($x = 0; $x < $col; $x++) { $stripped_Criteria = $Criteria[$x]; } } - if (!isset($prev_Criteria[$x]) + if ((empty($prev_Criteria) || !isset($prev_Criteria[$x])) || urldecode($prev_Criteria[$x]) != htmlspecialchars($stripped_Criteria)) { $curCriteria[$z] = $stripped_Criteria; $encoded_Criteria = urlencode($stripped_Criteria); @@ -480,7 +480,7 @@ for ($y = 0; $y <= $row; $y++) { @@ -490,7 +490,7 @@ for ($y = 0; $y <= $row; $y++) { " name="Or">