]> granicus.if.org Git - php/commitdiff
- Include 'class Phar extends PHP_Archive {}' when using -p
authorMarcus Boerger <helly@php.net>
Wed, 16 May 2007 23:00:18 +0000 (23:00 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 16 May 2007 23:00:18 +0000 (23:00 +0000)
ext/phar/phar.php
ext/phar/phar/pharcommand.inc

index c294e5c93095a1886025dcb02ff5ee451d0ca225..067ecc002d46f6dc6eece6a2672da7a9ee75d6a9 100644 (file)
@@ -503,7 +503,7 @@ class PharCommand extends CLICommand
                                }                               
                                $s.= '<?php if (!class_exists("Phar",0) && !class_exists("PHP_Archive")) { ?>';
                                $s.= file_get_contents($loader);
-                               $s.= '<?php } ?>';
+                               $s.= '<?php class Phar extends PHP_Archive {} } ?>';
                                if (substr($c,0,1) == '#') {
                                        $s.= substr($c,strpos($c, "\n")+1);
                                }
index a4da19ee71203ee531149bfec78e5e6a3ac7a68a..f8ab8eebf9532288634c52138e682c79332f18e6 100755 (executable)
@@ -260,7 +260,7 @@ class PharCommand extends CLICommand
                                }                               
                                $s.= '<?php if (!class_exists("Phar",0) && !class_exists("PHP_Archive")) { ?>';
                                $s.= file_get_contents($loader);
-                               $s.= '<?php } ?>';
+                               $s.= '<?php class Phar extends PHP_Archive {} } ?>';
                                if (substr($c,0,1) == '#') {
                                        $s.= substr($c,strpos($c, "\n")+1);
                                }