diff --git a/adminer/include/export.inc.php b/adminer/include/export.inc.php index 00b0b52c..11a98ea1 100644 --- a/adminer/include/export.inc.php +++ b/adminer/include/export.inc.php @@ -158,5 +158,5 @@ function dump_headers($identifier, $multi_table = false) { } $dump_output = ""; -$dump_output = ""; +$dump_format = ""; $max_packet = 1048576; // default, minimum is 1024 diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index e8447b75..9c3a9f17 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -254,7 +254,9 @@ function is_utf8($val) { } function shorten_utf8($string, $length = 80, $suffix = "") { - preg_match("~^((?:.|\n){0,$length})(.|\n)?~u", $string, $match); // ~s causes trash in $match[2] under some PHP versions + if (!preg_match("~^((?:.|\n){0,$length})(.|\n)?~u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions + preg_match("(^([\t\r\n -~]{0,$length})(.?))s", $string, $match); + } return h($match[1]) . $suffix . ($match[2] ? "..." : ""); }