From 2d4592a2ec708406fa7447f380fdce4c3b31e62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Thu, 3 Jan 2002 14:38:04 +0000 Subject: [PATCH] fixed a php error if there is no 'enclosed by' character --- ChangeLog | 2 ++ libraries/build_dump.lib.php3 | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c74092bc1..0b54dcff3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ $Id$ $Source$ 2001-01-03 Loïc Chapeaux + * libraries/build_dump.php3, lines 508-514: fixed a php error if there is + no "enclosed by" character. * db_details.php3, line 708; tbl_properties.inc.php3, line 71: maximum table and field size is 64 characters. Suggested by Marc Weidner . diff --git a/libraries/build_dump.lib.php3 b/libraries/build_dump.lib.php3 index 26694708c..c784be6e5 100644 --- a/libraries/build_dump.lib.php3 +++ b/libraries/build_dump.lib.php3 @@ -503,11 +503,15 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){ else if ($row[$j] == '0' || $row[$j] != '') { // loic1 : always enclose fields if ($what == 'excel') { - $row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]); + $row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]); + } + if ($enc_by == '') { + $schema_insert .= $row[$j]; + } else { + $schema_insert .= $enc_by + . str_replace($enc_by, $esc_by . $enc_by, $row[$j]) + . $enc_by; } - $schema_insert .= $enc_by - . str_replace($enc_by, $esc_by . $enc_by, $row[$j]) - . $enc_by; } else { $schema_insert .= '';