diff --git a/include/pear/Mail/RFC822.php b/include/pear/Mail/RFC822.php index f22e4ecfe880546e3558479066d1ac497a4ee586..abf1000d9f84293d444053121107d4cfaa20f2d8 100644 --- a/include/pear/Mail/RFC822.php +++ b/include/pear/Mail/RFC822.php @@ -363,13 +363,11 @@ class Mail_RFC822 { function _hasUnclosedQuotes($string) { $matches = array(); - if (!preg_match_all('/\\|"/S', $string, $matches, PREG_SET_ORDER)) + if (!preg_match_all('/[\\"]/', trim($string), $matches)) return false; - $string = trim($string); - $iMax = strlen($string); $in_quote = false; - $i = $slashes = 0; + $slashes = 0; foreach ($matches[0] as $m) { switch ($m) { diff --git a/setup/cli/modules/import.php b/setup/cli/modules/import.php index 68979f330cc8f5f959190448d0f639af4b9a0d03..27bf8962ef8d73880547ad3347c533c1c5ac3cbf 100644 --- a/setup/cli/modules/import.php +++ b/setup/cli/modules/import.php @@ -266,7 +266,7 @@ class Importer_B extends Importer { $this->stderr->write("Importing table: {$header[1]}\n"); $res = db_query("select column_name from information_schema.columns - where table_schema=DATABASE() and table_name='$t'"); + where table_schema=DATABASE() and table_name='{$header[1]}'"); while (list($field) = db_fetch_row($res)) if (!in_array($field, $header[2])) $this->fail($header[1] diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php index 1a40562c49f4fb02f8ad8a02214f617fe0c350fc..326a7dbf0f66d37636edadbdf0742d8667e1977a 100644 --- a/setup/test/tests/stubs.php +++ b/setup/test/tests/stubs.php @@ -92,6 +92,8 @@ class Phar { class ZipArchive { function statIndex() {} function getFromIndex() {} + function setCommentName() {} + function addFromString() {} } class finfo {