undefined offset and undefined variable

This commit is contained in:
Marc Delisle
2004-07-08 14:42:38 +00:00
parent ecb641ed13
commit c485b4b622
2 changed files with 8 additions and 11 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2004-07-08 Marc Delisle <lem9@users.sourceforge.net>
* db_details_qbe.php: undefined offset and undefined variable
2004-07-07 Marc Delisle <lem9@users.sourceforge.net> 2004-07-07 Marc Delisle <lem9@users.sourceforge.net>
* main.php: bug 984136, wrong alignment in RTL languages * main.php: bug 984136, wrong alignment in RTL languages
* lang/arabic-utf-8, lang/sync_lang.sh: bug 984176, wrong encoding * lang/arabic-utf-8, lang/sync_lang.sh: bug 984176, wrong encoding

View File

@@ -55,45 +55,39 @@ if (!isset($Rows)) {
$Rows = ''; $Rows = '';
} }
if (!isset($InsCol)) { if (!isset($InsCol)) {
$InsCol = ''; $InsCol = array();
} }
if (!isset($DelCol)) { if (!isset($DelCol)) {
$DelCol = ''; $DelCol = array();
} }
if (!isset($prev_Criteria)) { if (!isset($prev_Criteria)) {
$prev_Criteria = ''; $prev_Criteria = '';
} }
// workaround for a PHP3 problem
if (!isset($Criteria)) { if (!isset($Criteria)) {
//$Criteria = '';
$Criteria = array(); $Criteria = array();
for ($i = 0; $i < $Columns; $i++) { for ($i = 0; $i < $Columns; $i++) {
$Criteria[$i] = ''; $Criteria[$i] = '';
} }
} }
if (!isset($InsRow)) { if (!isset($InsRow)) {
// $InsRow = '';
$InsRow = array(); $InsRow = array();
for ($i = 0; $i < $Columns; $i++) { for ($i = 0; $i < $Columns; $i++) {
$InsRow[$i] = ''; $InsRow[$i] = '';
} }
} }
if (!isset($DelRow)) { if (!isset($DelRow)) {
// $DelRow = '';
$DelRow = array(); $DelRow = array();
for ($i = 0; $i < $Columns; $i++) { for ($i = 0; $i < $Columns; $i++) {
$DelRow[$i] = ''; $DelRow[$i] = '';
} }
} }
if (!isset($AndOrRow)) { if (!isset($AndOrRow)) {
// $AndOrRow = '';
$AndOrRow = array(); $AndOrRow = array();
for ($i = 0; $i < $Columns; $i++) { for ($i = 0; $i < $Columns; $i++) {
$AndOrRow[$i] = ''; $AndOrRow[$i] = '';
} }
} }
if (!isset($AndOrCol)) { if (!isset($AndOrCol)) {
// $AndOrCol = '';
$AndOrCol = array(); $AndOrCol = array();
for ($i = 0; $i < $Columns; $i++) { for ($i = 0; $i < $Columns; $i++) {
$AndOrCol[$i] = ''; $AndOrCol[$i] = '';
@@ -426,7 +420,7 @@ for ($y = 0; $y <= $row; $y++) {
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
if ($InsCol[$x] == 'on') { if (isset($InsCol[$x]) && $InsCol[$x] == 'on') {
echo "\n"; echo "\n";
$or = 'Or' . $w . '[' . $z . ']'; $or = 'Or' . $w . '[' . $z . ']';
?> ?>
@@ -436,7 +430,7 @@ for ($y = 0; $y <= $row; $y++) {
<?php <?php
$z++; $z++;
} // end if } // end if
if ($DelCol[$x] == 'on') { if (isset($DelCol[$x]) && $DelCol[$x] == 'on') {
continue; continue;
} }
@@ -984,7 +978,7 @@ if (!empty($qry_from)) {
$qry_where = ''; $qry_where = '';
$criteria_cnt = 0; $criteria_cnt = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
if (!empty($curField[$x]) && !empty($curCriteria[$x]) && $x && isset($last_where)) { if (!empty($curField[$x]) && !empty($curCriteria[$x]) && $x && isset($last_where) && isset($curAndOrCol)) {
$qry_where .= ' ' . strtoupper($curAndOrCol[$last_where]) . ' '; $qry_where .= ' ' . strtoupper($curAndOrCol[$last_where]) . ' ';
} }
if (!empty($curField[$x]) && !empty($curCriteria[$x])) { if (!empty($curField[$x]) && !empty($curCriteria[$x])) {