]> granicus.if.org Git - php/commitdiff
- Notice about missing class file when using pack -p optional
authorMarcus Boerger <helly@php.net>
Mon, 28 May 2007 15:32:21 +0000 (15:32 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 28 May 2007 15:32:21 +0000 (15:32 +0000)
ext/phar/phar.php

index 487e591855452e1a92f7848b1b6dee222da5a0dc..a460dc3b357d72e712b96ae27391ad16d86b21e5 100644 (file)
@@ -377,15 +377,18 @@ class PharCommand extends CLICommand
                        foreach(split("\n", `pear list-files PHP_Archive`) as $ent)
                        {
                                $matches = NULL;
-                               if (preg_match(",^php[ \t]+([^ \t].*pear[\\\\/]PHP[\\\\/]Archive.php)$,", $ent, $matches))
+                               if (preg_match(",^php[ \t]+([^ \t].*pear[\\\\/]PHP[\\\\/]Ar#chive.php)$,", $ent, $matches))
                                {
                                        $found = $matches[1];
                                        break;
                                }
                        }
-                       if (!isset($found) && $arg != 'optional') {
+                       if (!isset($found)) {
                                echo "Pear package PHP_Archive or Archive.php class file not found.\n";
-                               exit(1);
+                               if ($arg != 'optional')
+                               {
+                                       exit(1);
+                               }
                        }
                        $arg = $found;
                }