From 7ceba19cb80346b76f0d9033f80614c440b3b262 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 12 Jan 2006 20:55:46 +0000 Subject: [PATCH] remove high-ascii characters, and an assignment syntax that does not work on PHP 5.1.2 --- ChangeLog | 2 ++ libraries/common.lib.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b8d721eb..f3b0d5999 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2006-01-12 Marc Delisle * Documentation.html: typo, thanks to Cédric Corazza + * libraries/common.lib.php: remove high-ascii characters, and an + assignment syntax that does not work on PHP 5.1.2 2006-01-11 Marc Delisle * sql.php, libraries/sqlparser.lib.php: other fixes for bug #1394479 diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 7ba1eb80e..21fce244f 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -849,15 +849,21 @@ if (!defined('PMA_MINIMUM_COMMON')) { // get the duplicate entry // get table name - preg_match('�ALTER\sTABLE\s\`([^\`]+)\`�iu', $the_query, $error_table = array()); + // TODO: what would be the best delimiter, while avoiding + // special characters that can become high-ascii after editing, + // depending upon which editor is used by the developer? + $error_table = array(); + preg_match('@ALTER\sTABLE\s\`([^\`]+)\`@iu', $the_query, $error_table); $error_table = $error_table[1]; // get fields - preg_match('�\(([^\)]+)\)�i', $the_query, $error_fields = array()); + $error_fields = array(); + preg_match('@\(([^\)]+)\)@i', $the_query, $error_fields); $error_fields = explode(',', $error_fields[1]); // duplicate value - preg_match('�\'([^\']+)\'�i', $tmp_mysql_error, $duplicate_value = array()); + $duplicate_value = array(); + preg_match('@\'([^\']+)\'@i', $tmp_mysql_error, $duplicate_value); $duplicate_value = $duplicate_value[1]; $sql = '