From: Greg Beaver Date: Sat, 17 Jan 2004 17:20:36 +0000 (+0000) Subject: fix Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and { X-Git-Tag: php_ibase_before_split~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a440ed69353fd3a3365470ff3a0441c5eb6f2fee;p=php fix Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and { also fixes SOAP packaging error --- diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index 90960f8dbe..5a07f48fdc 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -1310,6 +1310,7 @@ class PEAR_Common extends PEAR $used_functions = array(); $extends = array(); $nodeps = array(); + $inquote = false; for ($i = 0; $i < sizeof($tokens); $i++) { if (is_array($tokens[$i])) { list($token, $data) = $tokens[$i]; @@ -1317,7 +1318,17 @@ class PEAR_Common extends PEAR $token = $tokens[$i]; $data = ''; } + if ($inquote) { + if ($token != '"') { + continue; + } else { + $inquote = false; + } + } switch ($token) { + case '"': + $inquote = true; + break; case T_CURLY_OPEN: case T_DOLLAR_OPEN_CURLY_BRACES: case '{': $brace_level++; continue 2; diff --git a/pear/package-PEAR.xml b/pear/package-PEAR.xml index b7881706c9..6f64ef2f60 100644 --- a/pear/package-PEAR.xml +++ b/pear/package-PEAR.xml @@ -47,9 +47,9 @@ - 1.3b5 - 2003-12-19 - beta + 1.3 + 2004-01-20 + stable PEAR Installer: @@ -58,6 +58,7 @@ PEAR Installer: * Bug #248 --force command does not work as expected * Bug #293 [Patch] PEAR_Error not calling static method callbacks for error-handler * Bug #324 pear -G gives Fatal Error (PHP-GTK not installed, but error is at engine level) +* Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and { * Moved download code into its own class * Fully unit tested the installer, packager, downloader, and PEAR_Common