Skip to content

Commit

Permalink
escape single quotes in column names
Browse files Browse the repository at this point in the history
Column names like `id'` must be escaped in a PHP string

Signed-off-by: Sven Strickroth <email@cs-ware.de>
  • Loading branch information
csware authored and lem9 committed Dec 16, 2011
1 parent e43ed55 commit 9fc23c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/export/php_array.php
Expand Up @@ -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 .= ')';
Expand Down

0 comments on commit 9fc23c8

Please sign in to comment.