From 9fc23c882467bca9809c6e05dd1dd38284b05abd Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 23 Jul 2011 03:56:36 +0200 Subject: [PATCH] escape single quotes in column names Column names like `id'` must be escaped in a PHP string Signed-off-by: Sven Strickroth --- libraries/export/php_array.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php index 2eabf5585..9a3b43eeb 100644 --- a/libraries/export/php_array.php +++ b/libraries/export/php_array.php @@ -172,7 +172,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) for ($i = 0; $i < $columns_cnt; $i++) { - $buffer .= "'" . $columns[$i]. "'=>" . var_export($record[$i], true) . (($i + 1 >= $columns_cnt) ? '' : ','); + $buffer .= var_export($columns[$i], true) . "=>" . var_export($record[$i], true) . (($i + 1 >= $columns_cnt) ? '' : ','); } $buffer .= ')';