]> granicus.if.org Git - php/commitdiff
- Fix stub/hashbang generation
authorMarcus Boerger <helly@php.net>
Fri, 21 Mar 2008 23:22:18 +0000 (23:22 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 21 Mar 2008 23:22:18 +0000 (23:22 +0000)
ext/phar/phar/pharcommand.inc

index 1b6f26895a190e8bb9d616196ed92ffa561cbc45..f3426423c966b7f0a4a84e3761bdede7329825ff 100755 (executable)
@@ -411,6 +411,8 @@ class PharCommand extends CLICommand
                 if (substr($hashbang, -1) != "\n") {
                     $hashbang .= "\n";
                 }
+            } else {
+               $hashbang = "";
             }
 
             if (isset($loader)) {
@@ -427,9 +429,9 @@ class PharCommand extends CLICommand
                 $s .= '?>';
                 $s .= $c;
 
-                $phar->setStub($hasbang . $s);
+                $phar->setStub($hashbang . $s);
             } else {
-                $phar->setStub($hasbang . $c);
+                $phar->setStub($hashbang . $c);
             }
             return new SplFileInfo($stub);
         }