]> granicus.if.org Git - php/commitdiff
fix Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and {
authorGreg Beaver <cellog@php.net>
Sat, 17 Jan 2004 17:20:36 +0000 (17:20 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 17 Jan 2004 17:20:36 +0000 (17:20 +0000)
also fixes SOAP packaging error

pear/PEAR/Common.php
pear/package-PEAR.xml

index 90960f8dbe40adf292ea8b86b3c27112b93a159a..5a07f48fdc2d2636087ba43841880c30c9c95cb8 100644 (file)
@@ -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;
index b7881706c96dc5674da765b64044119f22170746..6f64ef2f60b47bab1fb053a88050d3b073e57dde 100644 (file)
@@ -47,9 +47,9 @@
     </maintainer>
   </maintainers>
   <release>
-    <version>1.3b5</version>
-    <date>2003-12-19</date>
-    <state>beta</state>
+    <version>1.3</version>
+    <date>2004-01-20</date>
+    <state>stable</state>
     <notes>
 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