From: Marcus Boerger Date: Fri, 21 Mar 2008 23:22:18 +0000 (+0000) Subject: - Fix stub/hashbang generation X-Git-Tag: RELEASE_2_0_0a1~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d3bb76302dd7bff59ef1d9c2f9aafaad026a5a7;p=php - Fix stub/hashbang generation --- diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index 1b6f26895a..f3426423c9 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -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); }